python - urllib.urlopen to open page on same port just hangs -
I use urllib.urlopen
to open the web page running on the same host I'm trying to load it as the port I'm loading and it's just hanging. For example, I have a page: "" and I have the following code in it:
data = urllib.urlopen ("http://mydevserver.com:8001/testpage.html" )
When I try and load the page it is just hanging, though if I move the testpage.html script to a different port on the same host then it's okay Works. For example
data = urllib.urlopen ("http://mydevserver.com:8002/testpage.html")
Does anyone know That is why it might happen and how can I solve this problem?
Maybe a firewall? Wget / curl (assuming you are on Linux) or try to open a page from the command line on the browser, along with both ports on the settings, you can try packet sniffers to know what's going on And where the connection is stuck. Also, if testpage.html is produced dynamically, see if this has been hit, then check the webserver logs if the request appears there.
Comments
Post a Comment