Closed Bug 1439931 Opened 6 years ago Closed 6 years ago

extractScheme should lowercase its output

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: Gijs, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

When using the IO service to construct a URI, the scheme is always lowercase, even if it isn't in the input.

The same should probably be true when using extractScheme to get just the scheme in the would-be URL.
Assignee: nobody → valentin.gosu
Priority: -- → P3
Whiteboard: [necko-triaged]
Depends on: 1439944
btw, the output of net_ExtractURLScheme is still compared with lowercased schemes in various code points, this is just one.
You're right. Maybe I should do the lowercasing in net_ExtractURLScheme then?
Yes and you'll need to verify all callers.
Comment on attachment 8952745 [details]
Bug 1439931 - nsIIOService.extractScheme/net_ExtractURLScheme should lowercase its output

https://reviewboard.mozilla.org/r/221982/#review229102

r- only for the missing test file or explanation of the ini file change.

you can probably remove toLowerCase/LowerCaseEqualsLiteral now at:

https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/browser/base/content/browser.js#6079
https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/docshell/base/nsDefaultURIFixup.cpp#165
https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/docshell/base/nsDefaultURIFixup.cpp#235-280
https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/docshell/base/nsDefaultURIFixup.cpp#180
https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp#60
https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1683

::: netwerk/test/unit/xpcshell.ini:418
(Diff revision 2)
>  [test_bug1411316_http1.js]
>  [test_header_Server_Timing.js]
>  [test_trr.js]
>  # http2-using tests require node available
>  skip-if = os == "android"
> +[test_ioservice.js]

what's this change? missing the test file in the patch?
Attachment #8952745 - Flags: review?(honzab.moz) → review-
Comment on attachment 8952745 [details]
Bug 1439931 - nsIIOService.extractScheme/net_ExtractURLScheme should lowercase its output

https://reviewboard.mozilla.org/r/221982/#review229124
Attachment #8952745 - Flags: review?(honzab.moz) → review+
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/94346696a773
nsIIOService.extractScheme/net_ExtractURLScheme should lowercase its output r=mayhemer
https://hg.mozilla.org/mozilla-central/rev/94346696a773
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: