Skip to content

Commit

Permalink
Merge pull request #2712 from httpwg/mnot/2672
Browse files Browse the repository at this point in the history
Specify unicode encoding failure handling.
  • Loading branch information
mnot authored Jan 23, 2024
2 parents 7293cdf + 84d0c9f commit abcef57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion draft-ietf-httpbis-sfbis.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ Given a Date as input_date, return an ASCII string suitable for use in an HTTP f
Given a sequence of Unicode codepoints as input_sequence, return an ASCII string suitable for use in an HTTP field value.

0. If input_sequence is not a sequence of Unicode codepoints, fail serialization.
1. Let byte_array be the result of applying UTF-8 encoding ({{Section 3 of UTF8}}) to input_sequence.
1. Let byte_array be the result of applying UTF-8 encoding ({{Section 3 of UTF8}}) to input_sequence. If encoding fails, fail serialization.
2. Let encoded_string be a string containing "%" followed by DQUOTE.
3. For each byte in byte_array:
1. If byte is %x25 ("%"), %x22 (DQUOTE), or in the ranges %x00-1f or %x7f-ff:
Expand Down

0 comments on commit abcef57

Please sign in to comment.