[Twisted-Python] Can browse, but getPage() fails on localhost address

Terry Jones terry at jon.es
Thu Oct 29 14:01:18 EDT 2009

>>>>> "Steve" == Steve Steiner (listsin) <listsin at integrateddevcorp.com> writes:
Steve> curl  http://localhost/w3c-validator/check			   <-- returns HTML code
Steve> any browser to  http://localhost/w3c-validator/check  <-- returns HTML code

Steve> t.w.c.getPage("http://localhost/w3c-validator/check") <-- 404
Steve> wget  http://localhost/w3c-validator/check		   <-- 404

Steve> So what the heck is the difference in how these things resolve that  
Steve> address!?

When you say 404, do you really mean that you get a 404? Or are you just
saying that to informally tell us that it doesn't work?

If the former, then it seems this has nothing to do with DNS and host
names.  The connection is being made in all cases. It looks like there's
something different about the HTTP requests that causes the server to react
differently.  You're writing the server, correct? Can you log output?

If the latter, then I guess you really mean that the connection fails.


More information about the Twisted-Python mailing list