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(a)aliax.net>