Hmm, I just realized that it strictly speaking isn't possible to decode the path without splitting it at the same time. Is this true for the other uri parts too?
Otoh, I reckon that the occasions when a user can do a meaningful distinction between a path segment separating "/" and a quoted "/" inside a path segment are extremely rare.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-26 16:48: Subject: Quoting in Standards.URI
Seems like Standards.URI do neither encoding nor decoding according to rfc 2396:
Pike v7.7 release 3 running Hilfe v3.5 (Incremental Pike Frontend)
object uri = Standards.URI("http://foo/a%3Fb?c"); uri->path;
(1) Result: "/a%3Fb"
_Roxen.http_decode_string (uri->path);
(2) Result: "/a?b"
uri->path = _;
(3) Result: "/a?b"
(string) uri;
(4) Result: "http://foo/a?b?c"
Is it per design? I think it's pretty clear that it should handle this detail too. Unfortunately it's quite a problem to change that now since this class already is used extensively, and changes in quoting behavior is one of the most notorious compatibility problem generators.
Someone got any idea about how common it is that calling code "works around" this by doing its own encoding and decoding?
/ Martin Stjernholm, Roxen IS