From: Xu Pan Date: Sun, 26 Jun 2011 05:32:19 +0000 (+0800) Subject: add doseq to urlencode in model._encode_params to enable list as dict value X-Git-Tag: v0.5.1^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2ff0f40eb55ea572794daf286e74833ca773d59;p=services%2Fpython-requests.git add doseq to urlencode in model._encode_params to enable list as dict value --- diff --git a/AUTHORS b/AUTHORS index 8493a68..1f7c743 100644 --- a/AUTHORS +++ b/AUTHORS @@ -26,4 +26,5 @@ Patches and Suggestions - Richard Boulton - Miguel Olivares - Alberto Paro -- Jérémy Bethmont \ No newline at end of file +- Jérémy Bethmont +- 潘旭 (Xu Pan) diff --git a/requests/models.py b/requests/models.py index 8e60801..9b8f614 100644 --- a/requests/models.py +++ b/requests/models.py @@ -230,7 +230,7 @@ class Request(object): for (k, v) in data.items(): result[k.encode('utf-8') if isinstance(k, unicode) else k] \ = v.encode('utf-8') if isinstance(v, unicode) else v - return result, urllib.urlencode(result) + return result, urllib.urlencode(result, doseq=True) else: return data, data