Revision: 5943 http://openser.svn.sourceforge.net/openser/?rev=5943&view=rev Author: eliasbaixas Date: 2009-10-21 14:29:23 +0000 (Wed, 21 Oct 2009)
Log Message: ----------- Fixed error with quoted parameters on URIs Fixed error that prevented bind(2)'ing in MacOS X
Modified Paths: -------------- branches/1.4/modules/seas/encode_parameters.c branches/1.4/modules/seas/event_dispatcher.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
2009/10/21 Elias Baixas elias.baixas@voztele.com:
Revision: 5943 http://openser.svn.sourceforge.net/openser/?rev=5943&view=rev Author: eliasbaixas Date: 2009-10-21 14:29:23 +0000 (Wed, 21 Oct 2009)
Log Message:
Fixed error with quoted parameters on URIs
Hi Elias, a URI parameter cannot contain quotation (double quotation), neither in the key or in the value. This is:
Valid: 1) From: sip:elias@sipmola.org;aaa=111;bbb=222 2) From: sip:elias@sipmola.org;aaa=111;bbb="222"
Invalid: 3) From: sip:elias@sipmola.org;aaa="111"> 4) From: sip:elias@sipmola.org;"aaa"=111> 5) From: sip:elias@sipmola.org;aaa=111;"bbb"=222
Note that in case 2) bbb is a header parameter key, so its value can be quoted. Case 5) is invalid since the header parameter key ("bbb") cannot be quoted.
NOTE: I just mean *double* quotation ("). Using single quotation (') is allowed in key and value for SIP URI parameters and header parameters. The following is valid:
6) From: sip:elias@sipmola.org;'aaa'='111';'bbb'='222'
Regards.
PS: If it's useful for you, I coded some time ago a SIP grammar tester (using Ragel) implementing *100% strictly* the SIP ABNF grammar, so I can check with it *any* SIP ABNF component: http://dev.sipdoc.net/projects/ragel-sip-parser/wiki/Phase1
yes, indeed it was the body in a header parameter :P
Elias
On Wed, Oct 21, 2009 at 6:52 PM, Iñaki Baz Castillo ibc@aliax.net wrote:
2009/10/21 Elias Baixas elias.baixas@voztele.com:
Revision: 5943 http://openser.svn.sourceforge.net/openser/?rev=5943&view=rev Author: eliasbaixas Date: 2009-10-21 14:29:23 +0000 (Wed, 21 Oct 2009)
Log Message:
Fixed error with quoted parameters on URIs
Hi Elias, a URI parameter cannot contain quotation (double quotation), neither in the key or in the value. This is:
Valid:
- From: <sip:elias@sipmola.org sip%3Aelias@sipmola.org;aaa=111>;bbb=222
- From: <sip:elias@sipmola.org sip%3Aelias@sipmola.org
;aaa=111>;bbb="222"
Invalid: 3) From: sip:elias@sipmola.org sip%3Aelias@sipmola.org;aaa="111"> 4) From: sip:elias@sipmola.org sip%3Aelias@sipmola.org;"aaa"=111> 5) From: <sip:elias@sipmola.org sip%3Aelias@sipmola.org ;aaa=111>;"bbb"=222
Note that in case 2) bbb is a header parameter key, so its value can be quoted. Case 5) is invalid since the header parameter key ("bbb") cannot be quoted.
NOTE: I just mean *double* quotation ("). Using single quotation (') is allowed in key and value for SIP URI parameters and header parameters. The following is valid:
- From: <sip:elias@sipmola.org sip%3Aelias@sipmola.org
;'aaa'='111'>;'bbb'='222'
Regards.
PS: If it's useful for you, I coded some time ago a SIP grammar tester (using Ragel) implementing *100% strictly* the SIP ABNF grammar, so I can check with it *any* SIP ABNF component: http://dev.sipdoc.net/projects/ragel-sip-parser/wiki/Phase1
-- Iñaki Baz Castillo ibc@aliax.net