[Inteproxy-commits] r23 - trunk
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 8 12:50:28 CET 2007
Author: bh
Date: 2007-02-08 12:50:28 +0100 (Thu, 08 Feb 2007)
New Revision: 23
Modified:
trunk/ChangeLog
trunk/transcoder.py
Log:
* transcoder.py (OWSProxyGETTranscoder.get_url): Quote username
and password properly.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-07 18:05:22 UTC (rev 22)
+++ trunk/ChangeLog 2007-02-08 11:50:28 UTC (rev 23)
@@ -1,3 +1,8 @@
+2007-02-08 Bernhard Herzog <bh at intevation.de>
+
+ * transcoder.py (OWSProxyGETTranscoder.get_url): Quote username
+ and password properly.
+
2007-02-07 Bernhard Herzog <bh at intevation.de>
* getpassword.py: Remove unused import
Modified: trunk/transcoder.py
===================================================================
--- trunk/transcoder.py 2007-02-07 18:05:22 UTC (rev 22)
+++ trunk/transcoder.py 2007-02-08 11:50:28 UTC (rev 23)
@@ -8,9 +8,11 @@
"""Classes to modify HTTP requests."""
import urlparse
-from lxml import etree
+from urllib import quote_plus
from StringIO import StringIO
+from lxml import etree
+
import getpassword
@@ -76,8 +78,13 @@
if self.method == "GET":
user, password = self.get_password()
# FIXME: quote username and password properly
- query = "&".join(query.split("&")+ ["user=%s" % user,
- "password=%s" % password])
+ if query:
+ split_query = query.split("&")
+ else:
+ split_query = []
+ query = "&".join(split_query
+ + ["user=%s" % quote_plus(user),
+ "password=%s" % quote_plus(password)])
return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
More information about the Inteproxy-commits
mailing list