Re: [whatwg/url] Define hosts' public suffix and registrable domain. (#391)

Thanks, @sleevi and @annevk.

> From a spec question, what do you want this definition to entail for the `appspot.com` case?

I think we have two options:

1.  We return `appspot.com` for both the registrable domain and public suffix.
2.  We return `null` for the registrable domain, and `appspot.com` for the public suffix.

I prefer 2 (and I'm pretty sure that's what the current text suggests, though the PSL's algorithm isn't exactly clear in step 7 of https://publicsuffix.org/list/ what we ought to do if there's no additional label). Running with 1 would require callers to understand that `appspot.com` needs to be treated differently, and to ensure that they do some sort of "If X's registrable domain is identical to X's public suffix" check, which is trivial to forget. It seems safer to fail closed by returning `null` as the registrable domain for both TLDs like `com` and like `appspot.com`.

The bugs you linked, Ryan, are curious. I would have expected neither `appspot.com` nor `platform.sh` to be able to have cookies set. It seems like you need to pick one or the other: you're either a TLD, or you're not. Being both is weird (but also outside the scope of this bug to define, since we're basically punting to the PSL :) ).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/391#issuecomment-392670261

Received on Tuesday, 29 May 2018 06:49:35 UTC