This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib2 authentication redirection error(?)
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: allanbwilson, jjlee
Priority: normal Keywords:

Created on 2004-11-22 02:01 by allanbwilson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg23231 - (view) Author: Allan B. Wilson (allanbwilson) Date: 2004-11-22 02:01
I am trying to use urllib2 to retrieve a page from a
site requiring authentication. I supply the
authentication parameters, which succeed, and *a* page
is returned -- but not the page I originally requested.
As it turns out, the authentication is handled at a
completely different URL (actually a different domain);
I can confirm this by not supplying authentication
data, because I see a 302 earlier in the traceback when
authentication fails.

What I think is happening is that the redirect happens
to the authentication site, but the original URL that I
wanted has been forgotten. The page I get back is the
default page for the original (now authenticated) site,
not the page itself, which is deeper down in the site
hierarchy.

Sorry, I can't supply a patch!

Thanks
msg23232 - (view) Author: John J Lee (jjlee) Date: 2005-05-19 19:48
Logged In: YES 
user_id=261020

Allan, unfortunately there's no way of investigating this
without a running script that demonstrates the problem. 
Please supply one, or close the bug.

Thanks
msg23233 - (view) Author: Allan B. Wilson (allanbwilson) Date: 2005-05-22 18:39
Logged In: YES 
user_id=725330

Yes, that makes sense. Unfortunately the site is a financial
site so I won't be able to supply a demo script. Let's do
close it out on that basis.

Thanks
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41203
2004-11-22 02:01:03allanbwilsoncreate