[sr-dev] add_rcv_param wuses illegal chars in contact uri
Iñaki Baz Castillo
ibc at aliax.net
Sun Nov 8 16:06:02 CET 2009
El Domingo, 8 de Noviembre de 2009, Juha Heinanen escribió:
> while testing alias_contact() function, i tried to steel some code from
> nathelper add_rcv_param() function, but noticed that it adds illegal
> chars to contact uri when it encloses the param in quotes ("):
>
> param[RECEIVED_LEN] = '\"';
> memcpy(param + RECEIVED_LEN + 1, uri.s, uri.len);
> param[RECEIVED_LEN + 1 + uri.len] = '\"';
>
> i found out when twinkle complained about parse error in contact uri. i
> then went and checked from rfc3261 and twinkle is correct:
>
> uri-parameter = transport-param / user-param / method-param
> / ttl-param / maddr-param / lr-param / other-param
> other-param = pname [ "=" pvalue ]
> pvalue= 1*paramchar
> paramchar = param-unreserved / unreserved / escaped
> param-unreserved = [" / "]" / "/" / ":" / "&" / "+" / "$"
>
> " is not listed in unreserved either. i don't know if anyone is
> using that function. if not, better remove it or fix it.
Hi Juha, you are right, header params allow " in their values, however URI
params don't.
--
Iñaki Baz Castillo <ibc at aliax.net>
More information about the sr-dev
mailing list