-
Notifications
You must be signed in to change notification settings - Fork 603
Clarifications on the HTTP transport binding #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarifications on the HTTP transport binding #488
Conversation
…ore clearly define percent-encoding rules.Signed-off-by: Evan Anderson <[email protected]> Signed-off-by: Evan Anderson <[email protected]>
f67efd1 to
b20f1e0
Compare
cloudevents#488 escaping in URLs as well. Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
|
Question: this PR suggests encoding the Do we want to relax this and allow those characters to be written directly? The HTTP |
|
link checker errors look real |
|
Based on the discussion in the last call, @duglin asked me to add a note here, @evankanderson a) The PR #492 obsoletes the Content-Encoding discussion because it eliminates the attribute. The attribute was never meant to map to Content-Encoding. An HTTP implementation can nevertheless still use encodings like compression, but that's orthogonal to CloudEvents. b) For strings, we need a hybrid of your clarification and the text it replaces. Tim's clarification for the String type in the core spec now makes it clear that we must be able to handle Unicode. That means the step "that the string MUST first be encoded according to UTF-8" from the prior text is indeed vital, but the following step in that text is unclear. The result of UTF-8 encoding is a sequence of characters of which the ASCII7 characters are unchanged and should show up as such (a pure plain ASCII string should just be plain ASCII in effect), but all further characters are percent encoded. That composes with your rule about the "token" set but we need to get both under one roof. |
|
Thanks for pointing out #490. I'll try to rework the text in 3.1.4.2 (will be 3.1.3.2 after removing For example, HTTP headers dictate that leading and trailing whitespace are permitted around the header value -- section 3.2; similarly, multiple header values for the same field name should generally be combined into a single line using the |
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
|
I think I got what Clemens was suggesting; I suggested a two step encoding process:
I also ran the prettier.io markdown formatter and rationalized some of the header formatting and end-matter links. |
|
This should be compatible with #492 now. |
|
Updated, this got lost between |
http-transport-binding.md
Outdated
| Therefore, and analog to the encoding rules for Universal character set host | ||
| names in URIs [RFC3986 3.2.2][rfc3986], the string value MUST be further encoded | ||
| as follows: | ||
| String values which contain Unicode characters outside the ASCII range MUST be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we agreed on the call yesterday to remove the which contain Unicode characters outside the ASCII range text.
http-transport-binding.md
Outdated
| and per [RFC7230, section 3][rfc7230-section-3], HTTP headers MUST only use | ||
| printable characters from the US-ASCII character set, and are terminated by a | ||
| CRLF sequence. | ||
| CRLF sequence with optional whitespace around the header value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/optional/OPTIONAL/
|
We approved this on the 9/5 call with the agreement to remove "which contain Unicode characters outside the ASCII range" from line 212 |
2a4d562 to
646fddd
Compare
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
Signed-off-by: Evan Anderson <[email protected]>
646fddd to
bc6763c
Compare
|
@evankanderson thanks!! Merging per our approval on the call yesterday. |
Update based on feedback from #456
Define Context-Encoding header mapping based on
datacontentencodingMore clearly define percent-encoding (and particularly percent-decoding) rules.