Changeset 322 for py-tcpmultiplexer
- Timestamp:
- Jul 19, 2011, 9:48:37 PM (13 years ago)
- Location:
- py-tcpmultiplexer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
py-tcpmultiplexer/TCPMultiplexer.py
r320 r322 66 66 if urlid == '/': 67 67 self.request.send("HTTP/1.1 200 OK\n\n<html><head><title>Overview</title></head><body><h3>Streams</h3><ul>") 68 for urlid in urldata.keys():68 for urlid in sorted(urldata.keys()): 69 69 self.request.send('<li><a href="%(urlid)s">%(urlid)s</a></li>' % {'urlid': urlid}) 70 70 self.request.send("</ul><h3>Files</h3><ul>") … … 73 73 [dirs.remove(name) for name in dirs if name.startswith('.')] 74 74 [files.remove(name) for name in files if name.startswith('.')] 75 for name in files:75 for name in sorted(files): 76 76 self.request.send('<li><a href="%(item)s">%(item)s</li>' % { 'item' : os.path.join(root.replace(document_root,'',1),name) }) 77 77 self.request.send("</ul></body></html>") … … 92 92 self.request.send("HTTP/1.1 404 NOT FOUND\nContent-Type: text/html\n\n<h1>404</h1>The page '%s' does not exists" % urlid) 93 93 except IOError: 94 pass 95 except StandardError, e: 96 logging.warning('Server has issues: %s', e) 94 logging.info("Connection closed from '%s'", self.client_address[0]) 97 95 del urldata[urlid][self] 98 96 … … 129 127 headers = [] 130 128 for header in data.splitlines(): 131 if not header.strip(): break 129 if not header.strip(): 130 # Newlines in the beginning are evil 131 if headers: 132 break 133 else: 134 continue 132 135 headers.append(header) 133 136 boundry = headers[0] -
py-tcpmultiplexer/htdocs/browser.html
r321 r322 38 38 <input type="radio" name="cam" value="/cam1/video">Cam1</input> 39 39 <input type="radio" name="cam" value="/cam2/video">Cam2</input> 40 <input type="radio" name="cam" value="/cam3/video">Cam2</input> 41 <input type="radio" name="cam" value="/cam4/video">Cam2</input> 40 <input type="radio" name="cam" value="/cam3/video">Cam3</input> 41 <input type="radio" name="cam" value="/cam4/video">Cam4</input> 42 <input type="radio" name="cam" value="/cam5/video">Cam5</input> 42 43 </td></tr> 43 44 <tr><td>Select Audio:</td><td> -
py-tcpmultiplexer/streams.yaml
r320 r322 5 5 '/cam3/video' : 'http://172.16.2.200/stream.jpg' 6 6 '/cam4/video' : 'http://172.16.2.199/mjpeg' 7 '/cam5/video' : 'http://rvdzwet-MacBookPro.occ2011.org:9000/webcam'
Note:
See TracChangeset
for help on using the changeset viewer.