url part should not be unicoded before unquoted

Bug #339858 reported by kindy on 2009-03-09
2
Affects Status Importance Assigned to Milestone
web.py
High
Anand Chitipothu

Bug Description

>>> s
'/task/tag/%E5%A4%A7%E5%86%AC%E4%BC%9A'
>>> s2
u'/task/tag/%E5%A4%A7%E5%86%AC%E4%BC%9A'
>>> urllib.unquote(s2)
u'/task/tag/\xe5\xa4\xa7\xe5\x86\xac\xe4\xbc\x9a'
>>> urllib.unquote(s)
'/task/tag/\xe5\xa4\xa7\xe5\x86\xac\xe4\xbc\x9a'

ctx.path in lighttpd is not unquote(just like s in the sample code).
in web.application.load it become unicode(s2).
in web.application._match the regexp's result be unquoted,
but it's too late.

this works in CherryPyWSGIServer which with webpy.

my server info:
$ lighttpd -v
lighttpd-1.4.18 (ssl) - a light and fast webserver
Build-Date: Apr 16 2008 21:30:34

Anand Chitipothu (anandology) wrote :

I noticed this too.
Built-in webserver gives path after unquoting and lighttpd without unquoting.

Changed in webpy:
assignee: nobody → anandology
importance: Undecided → High
milestone: none → 0.32
status: New → Confirmed
Anand Chitipothu (anandology) wrote :
Changed in webpy:
status: Confirmed → Fix Committed
Changed in webpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers