On Wed, 13 Aug 2008 21:00:28 +0530, "O.R.Senthil Kumaran" <[EMAIL PROTECTED]>
wrote:
* scriptor Jean-Paul Calderone, explico
Some things:
http://foo.com
This is not a valid URL. The correct URL for the intended location here
is:
http://foo.com/
This is the root of the problem, I suspect. Firefox notices this problem
I doubt, if this is the problem, Jean.
I tried,
obj = urllib2.urlopen("http://www.wikispaces.com/")
Ended up at the same problem as described in my original post.
The tokens are different because these are values from actual requests.
Notice the important difference, though - Firefox's request begins with
a /.
Were those from the same site? I got different set of tokens as well.
Likely, urllib2 should do a bit more validation of its input and make
sure it is only making requests which follow the protocol.
I doubt if that was as simple. I am trying to figure out where the redirection
is getting lost of how firefox is figuring it out.
It *might* be a bad implementation that we are dealing, but still would like to
know where the problem escaping.
Adding the / to the end of the originally requested URL doesn't help. The
redirect that wikispaces.com generates is also missing a /. It's that
redirect URL which ultimately causes the problem.
It's pretty easy to see what's going on; start up wireshark and take a look.
Jean-Paul
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com