Trouble with proxies

Bruce Fletcher befletch at my-dejanews.com
Mon May 3 13:52:26 EDT 1999


In article <14123.28729.404968.815913 at bitdiddle.cnri.reston.va.us>,
  jeremy at cnri.reston.va.us wrote:
> It would be helpful to see the HTTP headers as well.  Can you try it
> with the following:
>
> f = urllib.urlopen('http://www.python.org/')
> msg = f.info()
> for hdr in msg.headers:
>     print hdr,
> data = f.readline()
>
> THis may shed a little more light on what specifically is the
> problem.  I agree with Guido, though, that the proxy server is
> generating the error message.
>
> Jeremy

Ok, here is the result with headers.  They answer the 'where from'
question, but not the 'why'.  Not for me at least:

Proxy-agent: Ositis-WinProxy
Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Encoding: 7bit
Content-Length: 161
<HEAD><TITLE>403 Forbidden</TITLE></HEAD>

<BODY><H1>403 Forbidden</H1>

<P>The request was not properly formatted.  A possible security risk
detected.</P>

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 21, in ?
    data = f.readline()
  File "C:\Program Files\Python\Lib\plat-win\socket.py", line 117, in readline
    new = self._sock.recv(self._rbufsize)
error: (10054, 'winsock error')

Where do I go from here?  I've tried to start a dialog with Ositis,
but I'm not very hopeful that they will be able to help.  As an aside,
I am curious why the 'winsock error' is occuring, since the response from
the proxy server looks pretty full-formed.  Any ideas on that part?

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