I have a Python script that captures streaming audio on the Internet.
The homepage is at http://beam-back.sourceforge.net It works fine
with Python 1.5.2 and Python 1.6. One of my users noticed the script
is broken under Python 2.0.
In the getreply function of httplib.py in Python 1.5.2, even if
ver[:5] != 'HTTP/', the connection is left open. I depend on this
behavior because streaming audio links found at
http://www.shoutcast.com/ return a status line like this:
ICY 200 OK
Under Python 1.6 and 1.5.2, I can happily go on and use getfile() to
obtain the data on the connection.
In the getreply function of httplib.py in Python 2.0, the BadStatusLine
exception (raised by ver[:5] != 'HTTP/' in begin) causes the connection
to be closed.
I'm writing to find out how I could go about discussing a possible
return to the previous behavior in future releases of Python. If
that is not feasible, I would be appreciative of any advice on how
I should go about porting the script to Python 2.0.
Regards,
--Kal
|