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 23891 - Is a "host" a string or a list of strings?
Summary: Is a "host" a string or a list of strings?
Status: RESOLVED FIXED
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:
Whiteboard:
Keywords:
Depends on:
Blocks: 23005
  Show dependency treegraph
 
Reported: 2013-11-22 20:36 UTC by Ian 'Hixie' Hickson
Modified: 2014-01-10 11:41 UTC (History)
2 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-11-22 20:36:45 UTC
# A host is a string [...] in the form of a domain [...]

# A domain is an ordered list of one or more domain labels.

Domain labels aren't defined, but let's suppose they are actually strings.

So a host is a string in the form of an ordered list of strings.

That doesn't make sense. :-)

Various algorithms in the spec seem to switch between treating "host" as a string and as a list of strings.
Comment 1 Anne 2013-11-25 15:00:48 UTC
https://github.com/whatwg/url/commit/232157a284157ca60d40dd391ef5ae88f79a9e9a

I'm still a bit torn whether to define the components of a URL as byte sequences or strings. API-wise the latter is easier, though it seems they are really byte sequences, including domain labels. Though domain labels also have a (Unicode) string variant.
Comment 2 Anne 2014-01-10 11:41:57 UTC
Marking FIXED as the issue raised here was resolved.