WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
187859
WebCore::URL::hostIsIPAddress needs a Windows implementation
https://bugs.webkit.org/show_bug.cgi?id=187859
Summary
WebCore::URL::hostIsIPAddress needs a Windows implementation
Ross Kirsling
Reported
2018-07-20 09:22:55 PDT
Currently on non-Cocoa, non-libsoup platforms, URL::hostIsIPAddress is just a stub:
https://github.com/WebKit/webkit/blob/767a0672697c45f01acb22e3fe00ff1f5c97871c/Source/WebCore/platform/URL.cpp#L1064-L1070
Not sure why it lacks a "FIXME", but this ought to be a default implementation, so that Windows ports can use it.
Attachments
Patch
(5.41 KB, patch)
2018-07-23 17:28 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Patch
(6.19 KB, patch)
2018-07-23 23:23 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2018-07-23 17:28:33 PDT
Created
attachment 345627
[details]
Patch
Fujii Hironori
Comment 2
2018-07-23 19:06:18 PDT
Comment on
attachment 345627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345627&action=review
> Source/WebCore/platform/URL.cpp:1082 > + if (digit > '9' || digit < (i ? '1' : '0'))
This loop scans backward. If i == 0, it is the last number. You want to check the first number here. It should be "(i == length - 1 ? '1' : '0')"
> Source/WebCore/platform/URL.cpp:1085 > + value += 10 * (digit - '0');
This is not correct. For example, a number '123' is given. value = 0; value += 10 * 3; value += 10 * 2; value += 10 * 1; Then value becomes 60, not 123.
Ross Kirsling
Comment 3
2018-07-23 23:23:21 PDT
Created
attachment 345637
[details]
Patch
Ross Kirsling
Comment 4
2018-07-23 23:30:08 PDT
Sorry, those really were some stupid mistakes on my part. It seems that ultimately forward iteration is the most straightforward here. I've also added a few extra test cases for IPv4 accordingly.
WebKit Commit Bot
Comment 5
2018-07-24 08:15:42 PDT
Comment on
attachment 345637
[details]
Patch Clearing flags on attachment: 345637 Committed
r234147
: <
https://trac.webkit.org/changeset/234147
>
WebKit Commit Bot
Comment 6
2018-07-24 08:15:43 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2018-07-24 08:16:19 PDT
<
rdar://problem/42541837
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug