if theurl.startswith("http://"): theurl = theurl[7:]
head = theurl[:theurl.find('/')]
tail = theurl[theurl.find('/'):]
response_code = 0
import httplib
conn = httplib.HTTPConnection(head)
conn.request("HEAD",tail)
res = conn.getresponse()
response_code = int(res.status)
http://www.garageband.com/mp3cat/.UZCKbS6N4qk/01_Saraenglish.mp3
Traceback (most recent call last):
File "check_data_404.py", line 51, in <module>
run()
File "check_data_404.py", line 35, in run
res = conn.getresponse()
File "/usr/lib/python2.6/httplib.py", line 950, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 390, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 354, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine
Does anyone know what "Bad Status Line" is?
Edit: I tried this for many servers, and many URL's and I still get this error?