ZF-5921: Zend_Uri_Http does not allow special chars in the path, query or fragment

Description

Zend_Uri_Http does not allow special characters like umlauts and such in the path, query or fragment, while those are valid. As Zend_Http_Client and other classes uses Zend_Uri directly, this makes it impossible to access those URLs. Currently the only way to work around this is to subclass Zend_Uri and all classes which utilize it. Tho this makes it really hard to upgrade to a new version of the framework.


$url = 'http://www.example.com/special-chars/ü';
var_dump(Zend_Uri::check($url)); // false

$url = 'http://www.example.com/?specialChars=ü';
var_dump(Zend_Uri::check($url)); // false

$url = 'http://www.example.com/#ü';
var_dump(Zend_Uri::check($url)); // false

Comments

the URI RFC (http://www.ietf.org/rfc/rfc2396.txt) clearly does not allow such characters in an unescaped form in a URL (and specifically not in the path segment).

We can add some "magic" in Zend_Uri that auto-escapes such things - but then how will you know not to escape characters such as '?' and '/'?

Well browsers like Firefox and so all know how and what to escape, and still display the unescaped URIs to the user. The user will always expect those URIs to workj in his applications where he enters them as well, so yeah, we should introduce some magic there then.

Browsers are also supposed to work for noobs. ZF is for developers (though they're not mutually exclusive :'( ).

Changing the issue type as it is obviously not a bug, but a feature request (at least that's what it has become).

Sure Dolf, but by telling this, you would force any developer to do the magic by himself, which simply cannot be right.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.