Why am I getting this error in python ? (httplib)

后端 未结 10 1700
情话喂你
情话喂你 2020-11-27 20:11
if theurl.startswith(\"http://\"): theurl = theurl[7:]
    head = theurl[:theurl.find(\'/\')]
    tail = theurl[theurl.find(\'/\'):]
response_code = 0
import httplib         


        
10条回答
  •  情话喂你
    2020-11-27 20:52

    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(...).

提交回复
热议问题