Discussion:
Charset restriction on parameter names
Philippe Mouawad
2017-08-27 20:03:26 UTC
Permalink
Hello,
I have a question regarding HTTP 1.1 and 2.0 and Multipart encoded form as
I didn't find a clear answer in RFC https://tools.ietf.org/html/rfc7578

Is there a restriction on the charset of parameter names, in this case what
is the encoding ?

Example, can a parameter be named :

- 安_param


Thanks.
--
Cordialement.
Philippe Mouawad.
Philippe Mouawad
2017-08-27 20:39:16 UTC
Permalink
It looks like there is such restriction if my understanding is correct:

-
https://stackoverflow.com/questions/20591599/why-arent-post-names-with-unicode-sent-correctly-when-using-multipart-form-data/20592910#20592910


And HTML5 has introduced another way of encoding such parameter names:

-
https://www.w3.org/TR/2013/WD-html51-20130528/forms.html#multipart-form-data


Is my understanding correct ?

Thanks for help
Regards


On Sun, Aug 27, 2017 at 10:03 PM, Philippe Mouawad <
Post by Philippe Mouawad
Hello,
I have a question regarding HTTP 1.1 and 2.0 and Multipart encoded form as
I didn't find a clear answer in RFC https://tools.ietf.org/html/rfc7578
Is there a restriction on the charset of parameter names, in this case
what is the encoding ?
- 安_param
Thanks.
--
Cordialement.
Philippe Mouawad.
--
Cordialement.
Philippe Mouawad.
Oleg Kalnichevski
2017-08-27 21:00:28 UTC
Permalink
Post by Philippe Mouawad
Hello,
I have a question regarding HTTP 1.1 and 2.0 and Multipart encoded form as
I didn't find a clear answer in RFC https://tools.ietf.org/html/rfc75
78
Is there a restriction on the charset of parameter names, in this case what
is the encoding ?
   - 安_param
Thanks.
Hi Philippe

As far as I can tell non-ASCII characters in parameter names are not
permitted based on RFC 2822, section 2.2

---
2.2. Header Fields

   Header fields are lines composed of a field name, followed by a colon
   (":"), followed by a field body, and terminated by CRLF.  A field
   name MUST be composed of printable US-ASCII characters (i.e.,
   characters that have values between 33 and 126, inclusive),

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Philippe Mouawad
2017-08-27 21:19:09 UTC
Permalink
Thanks Oleg.

Did you see my mail sent just before your reply ?

Thanks
Post by Oleg Kalnichevski
Post by Philippe Mouawad
Hello,
I have a question regarding HTTP 1.1 and 2.0 and Multipart encoded form as
I didn't find a clear answer in RFC https://tools.ietf.org/html/rfc75
78
Is there a restriction on the charset of parameter names, in this case what
is the encoding ?
- 安_param
Thanks.
Hi Philippe
As far as I can tell non-ASCII characters in parameter names are not
permitted based on RFC 2822, section 2.2
---
2.2. Header Fields
Header fields are lines composed of a field name, followed by a colon
(":"), followed by a field body, and terminated by CRLF. A field
name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive),
---------------------------------------------------------------------
<javascript:;>
<javascript:;>
--
Cordialement.
Philippe Mouawad.
Loading...