[Web-SIG] httplib ICY support (3 lines of code)
Mathias Panzenböck
grosser.meister.morti at gmx.net
Tue Aug 16 03:27:26 CEST 2005
Hi.
I hope this is the right place to poste this. To add ICY support to the
httplib module you just have to add 2 lines and 2 charactesr! ;)
ICY is a streaming protocoll developed by nullsoft (shoutcast and
winamp). It's identically to HTTP/1.0 but the server sends ICY instead
of HTTP/1.0. Other differences are additional header fields, but that
hasn't to bother httplib.
To add ICY support to httplib simple replace at line 308 in httplib.py:
if not version.startswith('HTTP/'):
with:
if version == 'ICY':
version = "HTTP/1.0"
elif not version.startswith('HTTP/'):
Now I can write a little stream-dumping ICY proxy. ;)
-panzi
More information about the Web-SIG
mailing list