Pylons / pylons

Pylons Framework, community maintained with guidance/assistance from the Pylons Project. Merged with repoze.bfg for Pyramid framework.
Other
231 stars 76 forks source link

Encode Location HTTP header in redirect responses in UTF-8 #15

Closed nidico closed 9 years ago

nidico commented 11 years ago

According to RFC 3987 [0], URIs with special characters should be encoded in UTF-8.

This commit forces the Location HTTP header in redirect responses to be encoded in UTF-8. This is in particular important, as current WebOb (version 1.2.3 as of today), which is a permitted dependency of current Pylons, would encode the location header in latin-1 instead, and fail in resolving that same URL on the next request.

See liqd/adhocracy#169 for a more in-depth explanation of the problem.

[0] http://tools.ietf.org/html/rfc3987