Summary: | URLSearchParams should be reflective | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Duren <adamduren> | ||||||
Component: | JavaScriptCore | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, buildbot, cdumez, commit-queue | ||||||
Priority: | P2 | ||||||||
Version: | Safari 10 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Adam Duren
2017-04-26 15:15:17 PDT
Test case: - http://jsbin.com/wipeqozazo/1/edit?html,output Passes in Firefox and Chrome, fails in STP. As per https://url.spec.whatwg.org/#concept-urlencoded-parser, it looks like we should replace '+' with 0x20 *before* percent-decoding, not after. It looks like we do this in reverse in URLParser::parseURLEncodedForm(). Created attachment 308553 [details]
Patch
Comment on attachment 308553 [details] Patch Attachment 308553 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3627956 New failing tests: js/dom/Promise-static-all.html Created attachment 308576 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
(In reply to Build Bot from comment #4) > Comment on attachment 308553 [details] > Patch > > Attachment 308553 [details] did not pass ios-sim-ews (ios-simulator-wk2): > Output: http://webkit-queues.webkit.org/results/3627956 > > New failing tests: > js/dom/Promise-static-all.html this is unlikely to be related. Comment on attachment 308553 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308553&action=review > Source/WebCore/platform/URLParser.cpp:2819 > + auto name = formURLDecode(bytes.toString().replace('+', 0x20)); We should make a StringView.replace that returns a String. This does an unnecessary copy. Maybe in a followup. (In reply to Alex Christensen from comment #7) > Comment on attachment 308553 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=308553&action=review > > > Source/WebCore/platform/URLParser.cpp:2819 > > + auto name = formURLDecode(bytes.toString().replace('+', 0x20)); > > We should make a StringView.replace that returns a String. This does an > unnecessary copy. Maybe in a followup. Ok, I can take a look in a follow-up Comment on attachment 308553 [details] Patch Clearing flags on attachment: 308553 Committed r215940: <http://trac.webkit.org/changeset/215940> All reviewed patches have been landed. Closing bug. |