views:

155

answers:

2
A: 

I remember a similar issue myself when accessing websites from behind a proxy. Since setting HTTP_PROXY environment variable and using wget works but the Python program does not, you may want to try using urllib2 instead of socket and specifically create a ProxyHandler object to complete the request successfully.

jtp
+1  A: 

I am not sure what the issue is but try using Wireshark. This will at least let you see what is going on at the network level. There should be enough info from the Wireshark packet logs to diagnose your problem.

doron