- From: Oliver Kopp <notifications@github.com>
- Date: Thu, 20 Jul 2017 15:33:14 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 20 July 2017 22:35:37 UTC
Background: I'd like to understand "When to Encode or Decode" from [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2.4) - and come from https://github.com/google/guava/issues/2078 providing some hints. When [parsing a Host](https://url.spec.whatwg.org/#host-parsing), the hostname is "percent decoded", but when [a host is serialized](https://url.spec.whatwg.org/#host-serializing), there is no percent encoding done. Is serializing not the opposite of parsing? When [parsing a URL](https://url.spec.whatwg.org/#url-parsing), the path is encoded. I really wonder, why the path is encoded and not decoded (like in the hostname). During [URL serialization](https://url.spec.whatwg.org/#url-serializing) there is no encoding or decoding done at all. Can this difference in the approaches (decoding vs. encoding in parsing) be clarified? Why is no encoding done during serialization? -- 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/issues/339
Received on Thursday, 20 July 2017 22:35:37 UTC