Uh oh!
There was an error while loading. Please reload this page.
url: make WHATWG URL implementation more spec compliant - #10317
Conversation
targos
commented
Dec 17, 2016
cpplint is not happy: How can I fix this? |
cjihrig
commented
Dec 17, 2016
I think it's asking you to do something like this: https://github.com/targos/node/blob/b35a5f84e89e021f27920ffc0c3562e84151d6fe/src/node_url.cc#L120 |
targos
commented
Dec 17, 2016
I tried with int32_t and the result is different |
cjihrig
commented
Dec 17, 2016
If you're using |
mscdex
commented
Dec 17, 2016
/cc @jasnell |
jasnell
commented
Dec 17, 2016
I won't be able to review until Monday but as long as the fix adheres to the WHATWG spec then +1 and thank you! |
sam-github
commented
Dec 19, 2016
Doesn't this imply that the WhatWG test suite is incomplete? Should the test changes be upstreamed to them? |
jasnell
commented
Dec 19, 2016
@sam-github ... that is entirely possible. |
targos
commented
Dec 19, 2016
@sam-github good idea. I opened a PR here: web-platform-tests/wpt#4365 |
There was a problem hiding this comment.
@jasnell Just wondering if you remember what this condition was for? Maybe it was a mistake to remove it.
There was a problem hiding this comment.
not off the top of my head... I'll be able to take a look in the next day or two. (sorry, company in town for the holiday is taking up quite a bit of my time this week)
targos
commented
Dec 20, 2016
My PR was merged and I updated our copy in the fixtures. Now the tests don't pass because of a spec change: I'll work on it when I have some time |
targos
commented
Dec 22, 2016
I had to add 3 other changes so that the updated tests can pass. This is ready to be reviewed again! |
targos
commented
Dec 22, 2016
targos
commented
Dec 23, 2016
cc @nodejs/collaborators |
targos
commented
Dec 30, 2016
Rebased. PTAL. |
targos
commented
Dec 31, 2016
targos
commented
Dec 31, 2016
Should I squash all the commits together? If I don't, there will be commits with failing tests. |
benjamingr
commented
Dec 31, 2016
I'm not familiar with the spec intimately, but I went through the changes and spec and they all LGTM |
gibfahn
commented
Dec 31, 2016
Definitely worth squashing so there aren't any commits with failing tests. |
jasnell
commented
Jan 1, 2017
+1 to squashing |
This patch contains the following changes: url: make IPv4 parser more spec compliant * Return int64_t from ParseNumber to prevent overflow for valid big numbers * Don't throw when there are more than 4 parts (it cannot be an IP address) * Correctly interpret the address and don't always throw when there are numbers > 255 Ref: https://url.spec.whatwg.org/#concept-ipv4-parserFixes: nodejs#10306 url: percent encode fragment to follow spec change Ref: whatwg/url#150 Ref: whatwg/url@373dbed url: fix URL#search setter The check for empty string must be done before removing the leading '?'. Ref: https://url.spec.whatwg.org/#dom-url-search url: set port to null if an empty string is given This is to follow a spec change. Ref: whatwg/url#113 url: fix parsing of paths with Windows drive letter test: update WHATWG URL test fixtures PR-URL: nodejs#10317 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos
commented
Jan 1, 2017
Landed in db18dd8 |
This patch contains the following changes: url: make IPv4 parser more spec compliant * Return int64_t from ParseNumber to prevent overflow for valid big numbers * Don't throw when there are more than 4 parts (it cannot be an IP address) * Correctly interpret the address and don't always throw when there are numbers > 255 Ref: https://url.spec.whatwg.org/#concept-ipv4-parserFixes: #10306 url: percent encode fragment to follow spec change Ref: whatwg/url#150 Ref: whatwg/url@373dbed url: fix URL#search setter The check for empty string must be done before removing the leading '?'. Ref: https://url.spec.whatwg.org/#dom-url-search url: set port to null if an empty string is given This is to follow a spec change. Ref: whatwg/url#113 url: fix parsing of paths with Windows drive letter test: update WHATWG URL test fixtures PR-URL: #10317 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This patch contains the following changes: url: make IPv4 parser more spec compliant * Return int64_t from ParseNumber to prevent overflow for valid big numbers * Don't throw when there are more than 4 parts (it cannot be an IP address) * Correctly interpret the address and don't always throw when there are numbers > 255 Ref: https://url.spec.whatwg.org/#concept-ipv4-parserFixes: #10306 url: percent encode fragment to follow spec change Ref: whatwg/url#150 Ref: whatwg/url@373dbed url: fix URL#search setter The check for empty string must be done before removing the leading '?'. Ref: https://url.spec.whatwg.org/#dom-url-search url: set port to null if an empty string is given This is to follow a spec change. Ref: whatwg/url#113 url: fix parsing of paths with Windows drive letter test: update WHATWG URL test fixtures PR-URL: #10317 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
url
Description of change
address)
numbers > 255
Ref: https://url.spec.whatwg.org/#concept-ipv4-parser
Fixes: #10306