I have a method which encodes some key-value entries into an ASCII string with Percent-Encoding.
The result value is expected to be used as a http header value.
With following entries
("English", "love")
("한국어", "사랑")
The method generates
%ED%95%9C%EA%B5%AD%EC%96%B4=%EC%82%AC%EB%9E%91&English=love
Which looks like
key=value(&key=value)*
- Keys and values are encoded as Percent-Encoding
- Encoded key and value are concatenated with
=. - Pairs of encoded key and values are concatenated with
&.
My question is, Is this output string can be used as http header field-value?
Is there any problem or concern?
As long you use printable US-ASCII, there shouldn’t be a problem.