2 messages in org.python.python-bugs-list[ python-Bugs-918368 ] urllib doesn't...
FromSent OnAttachments
SourceForge.netMar 17, 2004 5:41 pm 
SourceForge.netMar 18, 2004 5:38 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-918368 ] urllib doesn't correct server returned urlsActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 18, 2004 5:38:06 pm
List:org.python.python-bugs-list

Bugs item #918368, was opened at 2004-03-17 22:41 Message generated for change (Comment added) made by robzed You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=918368&group_id=5470

Category: Python Library Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: Rob Probin (robzed) Assigned to: Nobody/Anonymous (nobody) Summary: urllib doesn't correct server returned urls

Initial Comment: On a URL request where the server returns a URL with spaces in, urllib doesn't correct it before requesting the new page.

I think this is technically a server error, however, it does work from web browsers (Mozilla, Safari) but not from Python urllib.

I would suggest that when urllib is following "moved temporarily" links (or similar) from a server it translates spaces to %20.

See example program file for more including detailed server/client transactions text.

----------------------------------------------------------------------

Comment By: Rob Probin (robzed)

Date: 2004-03-18 22:38

Message: Logged In: YES user_id=1000470

I've tested a change to "redirect_internal(self, url, fp, errcode, errmsg, headers, data)" in "urllib.py" that adds a single line newurl = newurl.replace(" ","%20") after the basejoin() function call that appears to fix the problem.

This information is placed in the public domain.

----------------------------------------------------------------------