Multiple headers with the same name

207 views
Skip to first unread message

Curatica

unread,
Dec 27, 2009, 8:55:42 PM12/27/09
to UniMRCP
Hi Arsen,

I was curious about the ability to use a header name multiple times in
a message (such as SET-PARAMS which is the only one I tested). The
specification is grammatically incoherent when it refers to this
subject:

"Multiple headers with the same name MAY be present in a message if
and only if the entire value for that header is defined as a
commaseparated
list [i.e., #(values)]".

The way I read it is that multiple headers with the same name CANNOT
be present in a message but the effect can be achieved by specifying
the header once and its multiple values as a comma separated list:

<header-name>:<value-1>,<value-2>,...<value-n>

where the colon, ":" and the commas, "," are to be taken textually.

I tried to use this technique to set multiple values for the parameter
"Vendor-Specific-Parameters". The server that I use for testing did
not tolerate the commas and returned 404 (Illegal Value for Header).
But it accepted a semicolon, ";", instead of a comma. This is the same
separator it uses when it returns multiple values for "Vendor-Specific-
Parameters" in a response to GET-PARAMS.

I wonder if I misread the specification or the server is incorrect in
using ";" instead of ","...

Thanks a lot.

Arsen Chaloyan

unread,
Dec 28, 2009, 3:22:50 AM12/28/09
to uni...@googlegroups.com
Hi Vlad,

On Mon, Dec 28, 2009 at 5:55 AM, Curatica <cura...@gmail.com> wrote:
> Hi Arsen,
>
> I was curious about the ability to use a header name multiple times in
> a message (such as SET-PARAMS which is the only one I tested). The
> specification is grammatically incoherent when it refers to this
> subject:
>
> "Multiple headers with the same name MAY be present in a message if
> and only if the entire value for that header is defined as a
> commaseparated
> list [i.e., #(values)]".

Honestly speaking, I don't fully understand how, when and for what the
same header name should be present in a message.

>
> The way I read it is that multiple headers with the same name CANNOT
> be present in a message but the effect can be achieved by specifying
> the header once and its multiple values as a comma separated list:
>
> <header-name>:<value-1>,<value-2>,...<value-n>

I'm not sure such an option exists.


>
> where the colon, ":" and the commas, "," are to be taken textually.
>
> I tried to use this technique to set multiple values for the parameter
> "Vendor-Specific-Parameters". The server that I use for testing did
> not tolerate the commas and returned 404 (Illegal Value for Header).
> But it accepted a semicolon, ";", instead of a comma. This is the same
> separator it uses when it returns multiple values for "Vendor-Specific-
> Parameters" in a response to GET-PARAMS.

The value of "Vendor-Specific-Parameters" header is a string
consisting of ";" separated name-value pairs. So it's a bit special
case.


>
> I wonder if I misread the specification or the server is incorrect in
> using ";" instead of ","...

Server behaves according to spec to me, as name-value pairs should be
separated by ";"

vendor-specific = "Vendor-Specific-Parameters" ":"
[vendor-specific-av-pair
*(";" vendor-specific-av-pair)] CRLF


>
> Thanks a lot.

You're welcome
>
> --
>
> You received this message because you are subscribed to the Google Groups "UniMRCP" group.
> To post to this group, send email to uni...@googlegroups.com.
> To unsubscribe from this group, send email to unimrcp+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/unimrcp?hl=en.
>
>
>

--
Arsen Chaloyan
The author of UniMRCP
http://www.unimrcp.org

Reply all
Reply to author
Forward
0 new messages