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.
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.
Lint Errors | Excuse: Gated constants. |
Severity | Location | Code | Message |
---|---|---|---|
Error | src/utils/utils.php:1317 | XHP45 | PHP Compatibility |
Error | src/utils/utils.php:1317 | XHP45 | PHP Compatibility |
Unit Tests OK |
Buildable 21744 | |
Build 29671: Run Core Tests | |
Build 29670: arc lint + arc unit |
src/markup/engine/remarkup/blockrule/PhutilRemarkupTestInterpreterRule.php | ||
---|---|---|
14 | HA HA HA THIS TEST WOULD PREVIOUSLY FAIL UNDER UNUSUAL VALUES OF arg_separator.output HA HA HA PHP |
src/parser/PhutilURI.php | ||
---|---|---|
177 | Ah, thanks! |
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.