Trouble with proxies

Bruce Fletcher befletch at my-dejanews.com
Mon May 3 18:15:19 EDT 1999


In article <055401be959b$835c8220$f29b12c2 at pythonware.com>,
  "Fredrik Lundh" <fredrik at pythonware.com> wrote:
> I've lost the beginning of this thread, but you may wish
> to make sure that urllib.py is sending a Host header with
> the request.
>
> try adding some debugging code to urllib.py's open_http;
> something like:
>
>   h = httplib.HTTP(host)
>   h.set_debuglevel(1) # enable logging
>
> and post the result.  may give us some additional
> clues.

And the result is:

send: 'GET http://www.python.org/ HTTP/1.0\015\012'
send: 'Host: www.python.org\015\012'
send: 'User-agent: Python-urllib/1.10\015\012'
Traceback (innermost last):
  File "C:\PROGRA~1\PYTHON\TOOLS\IDLE\ScriptBinding.py", line 131, in
run_module_event
    execfile(filename, mod.__dict__)
  File "C:\Users\Bruce\postal codes\idle_experiment.py", line 9, in ?
    f = urllib.urlopen('http://www.python.org/')
  File "C:\Program Files\Python\Lib\urllib.py", line 59, in urlopen
    return _urlopener.open(url)
  File "C:\Program Files\Python\Lib\urllib.py", line 157, in open
    return getattr(self, name)(url)
  File "C:\Program Files\Python\Lib\urllib.py", line 263, in open_http
    for args in self.addheaders: apply(h.putheader, args)
  File "C:\Program Files\Python\Lib\httplib.py", line 105, in putheader
    self.send(str)
  File "C:\Program Files\Python\Lib\httplib.py", line 84, in send
    self.sock.send(str)
  File "<string>", line 1, in send
IOError: [Errno socket error] (10054, 'winsock error')

Does that lead anywhere?

Thanks,
- Bruce

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




More information about the Python-list mailing list