See D20039. Although http_build_query() works fine for the most part, it does the wrong thing by default if arg_separator.output is set in configuration.
Provide a wrapper which forces the expected behavior.
Differential D20049
Provide "phutil_build_http_querystring()", like "http_build_query()" but not wrong by default epriestley on Jan 28 2019, 11:10 PM. Authored by Tags None Referenced Files
Subscribers None
Details See D20039. Although http_build_query() works fine for the most part, it does the wrong thing by default if arg_separator.output is set in configuration. Provide a wrapper which forces the expected behavior. Ran unit tests.
Diff Detail
Event Timeline
Comment Actions
This corresponds to rawurlencode(). The default mode (PHP_QUERY_RFC1738) corresponds to urlencode(). The only differences for this new mode are:
The space encoding as %20 seems strongly preferable, since any reasonable parser can and should handle it unambiguously, while the meaning of + to parsers is ambiguous. This is also what Duo (at least) expects, and what we'd expect ourselves. Comment Actions
|