Comment 10 for bug 451512

Revision history for this message
Olivier Tilloy (osomon) wrote : Re: MediaUri corrupts my URI

Interestingly, I couldn't find in the RFC any details on the expected syntax of the query part of a URI (http://tools.ietf.org/html/rfc3986#section-3.4), and wikipedia seems to confirm that "the query string syntax is not generically defined" (http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax).

Meaning that parsing the query string into a dictionary makes an unjustified assumption on the form of the query (which by the way can take other forms, wikipedia mentions the semicolon as a valid separator for parameters as well as the ampersand).

The correct fix would consist in storing the original query string, also parse it into a dictionary if needed/required, and when returning a string representation of the URI, use the original query string.