New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 660875 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

KURL protocol is really the scheme

Project Member Reported by csharrison@chromium.org, Oct 31 2016

Issue description

In https://codereview.chromium.org/2459143002/, rdevlin.cronin mentioned that protocol is not always the same as scheme. For some protocols, the name and scheme match exactly (http,https), but for some (e.g. nntp and news) it does not.

In the code, KURL just pulls the scheme piece from the parsed struct. Should KURL::protocol be renamed to scheme?
 

Comment 1 by brettw@chromium.org, Oct 31 2016

I never read these as different. Document.Location uses "protocol" for example.
SGTM. To make matters slightly more confusing, the wikipedia page for URI notes:

"While most URI schemes were originally designed to be used with a particular protocol, and often have the same name (such as the http scheme, which is generally used for interacting with web resources using HTTP), they should not be referred to as protocols. Some URI schemes are not associated with any specific protocol (e.g. file) and many others do not use the name of a protocol as their prefix (e.g. news)."

This has at least caused confusion in the linked crrev, so possibly we should at least add documentation to KURL::protocol. I think mass re-name is probably overkill (esp. w/ location.protocol).

My understanding is that they (scheme and protocol) are almost always the same, but not necessarily (as in the news: vs nttp example).  Given URLs are fairly sacred and we want to be as accurate as possible, it seems like we should be using the proper language when we can.

But I'm not an owner in any of the correlating areas, so if I'm in the minority, I'll be quiet. :)
Labels: TE-NeedsTriageHelp
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 1 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment