This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25130 - spec disallows fragments in both "absolute URL" and "relative URL"
Summary: spec disallows fragments in both "absolute URL" and "relative URL"
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL: http://url.spec.whatwg.org/#concept-a...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 04:39 UTC by Michael[tm] Smith
Modified: 2014-05-22 10:27 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael[tm] Smith 2014-03-24 04:39:03 UTC
I suggest rewriting the definition of "absolute URL" in the spec to explicitly state that it can optionally contain a fragment:

— An absolute URL must be a scheme, followed by ":", followed by either a scheme-relative URL, if scheme is a relative scheme, or scheme data otherwise, optionally followed by "?" and a query, *optionally followed by "#" and a fragment*.

And similarly for "relative URL".

Then change the definition of "URL" to just:

— A URL must be written as either a relative URL or an absolute URL.

That is, remove from there the part that says 'optionally followed by "#" and a fragment' (because it's moved instead to the definitions of "absolute URL" and "relative URL".

Rationale: I want to directly reference just the definition of "absolute URL" from the spec, but if I do that now I end up with something that can't contain a fragment. (So right now I'd have to instead reference the spec by saying something like, "A URL that is an absolute URL.")
Comment 1 Anne 2014-03-24 11:34:04 UTC
That would no longer match https://tools.ietf.org/html/rfc3986#section-4.3

Though the current definition for relative URL does not match relative-ref either so maybe it doesn't matter. Depends a bit on the dependencies...
Comment 2 Michael[tm] Smith 2014-03-24 14:22:28 UTC
(In reply to Anne from comment #1)
> That would no longer match https://tools.ietf.org/html/rfc3986#section-4.3

Ah, OK. I guess there much be some reason for it having been defined that way previously.

> Though the current definition for relative URL does not match relative-ref
> either so maybe it doesn't matter. Depends a bit on the dependencies...

I guess for "absolute URL" we shouldn't violate the previous definition unless there's a good reason to. I can't say that I personally know of any really compelling reasons to change it.
Comment 3 Anne 2014-05-22 10:27:14 UTC
I guess once there's a dependency that shows this is needed we can revisit this.