You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Philippe Mouawad <ph...@gmail.com> on 2017/08/27 20:03:26 UTC
Charset restriction on parameter names
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.
Fwd: Charset restriction on parameter names
Posted by Philippe Mouawad <ph...@gmail.com>.
---------- Forwarded message ----------
From: *Oleg Kalnichevski* <ol...@apache.org>
Date: Sunday, August 27, 2017
Subject: Charset restriction on parameter names
To: HttpClient User Discussion <ht...@hc.apache.org>
On Sun, 2017-08-27 at 22:03 +0200, Philippe Mouawad wrote:
> 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 ?
>
> Example, can a parameter be named :
>
> - 安_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-unsubscribe@hc.apache.org
<javascript:;>
For additional commands, e-mail: httpclient-users-help@hc.apache.org
<javascript:;>
--
Cordialement.
Philippe Mouawad.
Re: Charset restriction on parameter names
Posted by Philippe Mouawad <ph...@gmail.com>.
Thanks Oleg.
Did you see my mail sent just before your reply ?
Thanks
On Sunday, August 27, 2017, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sun, 2017-08-27 at 22:03 +0200, Philippe Mouawad wrote:
> > 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 ?
> >
> > Example, can a parameter be named :
> >
> > - 安_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-unsubscribe@hc.apache.org
> <javascript:;>
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> <javascript:;>
>
>
--
Cordialement.
Philippe Mouawad.
Re: Charset restriction on parameter names
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2017-08-27 at 22:03 +0200, Philippe Mouawad wrote:
> 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 ?
>
> Example, can a parameter be named :
>
> - 安_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-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Charset restriction on parameter names
Posted by Philippe Mouawad <ph...@gmail.com>.
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 <
philippe.mouawad@gmail.com> wrote:
> 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.
>
>
>
--
Cordialement.
Philippe Mouawad.
Re: Charset restriction on parameter names
Posted by Philippe Mouawad <ph...@gmail.com>.
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 <
philippe.mouawad@gmail.com> wrote:
> 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.
>
>
>
--
Cordialement.
Philippe Mouawad.