4 messages in org.python.python-bugs-list[ python-Bugs-833405 ] urllib.urlenco...
FromSent OnAttachments
SourceForge.netMar 31, 2004 1:01 am 
SourceForge.netMar 31, 2004 11:56 am 
SourceForge.netApr 1, 2004 4:13 pm 
SourceForge.netApr 3, 2004 8:19 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-833405 ] urllib.urlencode doesn't work for output from cgi.parse_qsActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 31, 2004 11:56:15 am
List:org.python.python-bugs-list

Bugs item #833405, was opened at 2003-10-30 17:39 Message generated for change (Comment added) made by myers_carpenter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=833405&group_id=5470

Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Myers Carpenter (myers_carpenter) Assigned to: Nobody/Anonymous (nobody) Summary: urllib.urlencode doesn't work for output from cgi.parse_qs

Initial Comment:

urllib.urlencode(cgi.parse_qsl('ext=.jpg&outquality=56')) 'ext=.jpg&outquality=56'

urllib.urlencode(cgi.parse_qs('ext=.jpg&outquality=56')) 'ext=%5B%27.jpg%27%5D&outquality=%5B%2756%27%5D'

"%5B%27" = "['"

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

Comment By: Myers Carpenter (myers_carpenter)

Date: 2004-03-31 11:56

Message: Logged In: YES user_id=335935

Can you name one web app that you know will take args in the form of "ext=[27.jpg]"? Why not do some type inspection to see what types you are dealing with? What is the use of encoding a list in a url using python syntax?

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

Comment By: Mike Brown (mike_j_brown) Date: 2004-03-31 01:01

Message: Logged In: YES user_id=371366

As per the urlencode() API documentation, you are passing in sequences, so you need to set the doseq flag.

urllib.urlencode(cgi.parse_qs

('ext=.jpg&outquality=56'),doseq=1) 'ext=.jpg&outquality=56'

I recommend that this bug report be closed as Invalid.

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