Skip to content

Commit 4136b90

Browse files
author
Richard Jones
committed
initial attempt at favicon support, complete failure
1 parent 9c99083 commit 4136b90

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

roundup/scripts/roundup_server.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.22 2003-04-24 04:27:32 richard Exp $
19+
$Id: roundup_server.py,v 1.23 2003-04-24 07:19:02 richard Exp $
2020
"""
2121

2222
# python version check
@@ -59,6 +59,18 @@
5959
## end configuration
6060
#
6161

62+
import zlib, base64
63+
favico = zlib.decompress(base64.decodestring('''
64+
eJyVUk2IQVEUfn4yaRYjibdQZiVba/ZE2djIUmHWFjaKGVmIlY2iFMVG2ViQhXqFSP6iFFJvw4uF
65+
LGdWd743mpeMn+a88917Oue7955z3qEoET6FQkHx8iahKDV2A8B7XgERRf/EKMSUzyf8ypbbnnQy
66+
mWBdr9eVSkVw3tJGoxGNRpvNZigUyufzWPv9Pvwcx0UiERj7/V4g73Y7j8fTarWMRmO73U4kEkKI
67+
YZhardbr9eLxuOD0+/2ZTMZisYjFYpqmU6kU799uN5tNMBg8HA7ZbPY8GaTh8/mEipRKpclk0ul0
68+
NpvNarUmk0mWZS/yr9frcrmc+iMOh+NWydPp1Ov1SiSSc344HL7fKKfTiSN2u12tVqOcxWJxn6/V
69+
ag0GAwxkrlKp5vP5fT7ulMlk6XRar9dLpVIUXi6Xb5Hxa1wul0ajKZVKsVjM7XYXCoVOp3OVPJvN
70+
AoFAtVo1m825XO7hSODOYrH4kHbxxGAwwODBGI/H6DBs5LNara7yl8slGjIcDsHpdrunU6PRCAP2
71+
r3fPdUcIYeyEfLSAJ0LeAUZHCAt8Al/8/kLIEWDB5YDj0wm8fAP6fVfo
72+
'''.strip()))
73+
6274
class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
6375
TRACKER_HOMES = TRACKER_HOMES
6476
ROUNDUP_USER = ROUNDUP_USER
@@ -115,8 +127,16 @@ def index(self):
115127
def inner_run_cgi(self):
116128
''' This is the inner part of the CGI handling
117129
'''
118-
119130
rest = self.path
131+
132+
if rest == '/favicon.ico':
133+
raise client.NotFound
134+
# self.send_response(200)
135+
# self.send_header('Content-Type', 'image/x-ico')
136+
# self.end_headers()
137+
# self.wfile.write(favicon)
138+
# return
139+
120140
i = rest.rfind('?')
121141
if i >= 0:
122142
rest, query = rest[:i], rest[i+1:]

0 commit comments

Comments
 (0)