if theurl.startswith(\"http://\"): theurl = theurl[7:]
head = theurl[:theurl.find(\'/\')]
tail = theurl[theurl.find(\'/\'):]
response_code = 0
import httplib
Are you using a proxy?
If so, perhaps the proxy server is rejecting HEAD requests.
Do you get the same problem if you issue a GET request? If GET works I'd suspect that there is a proxy in your way.
You can see what's going on in more detail by calling conn.set_debuglevel(1) prior to calling conn.request(...).