smalltalk
/
osmo-st-sip
Archived
1
0
Fork 0

grammar: The header fields may be case insensitivie

We must extend the grammar to add caseInsensitive to a lot of
fields as they are case-insensitive as part of the specification
this even applies to some parameter names where expires and
eXpiReS are considered to be the same. Start with the simple
case of the parameter.
This commit is contained in:
Holger Hans Peter Freyther 2014-03-14 13:45:57 +01:00
parent 6f2a50603f
commit dd874d294a
3 changed files with 3 additions and 2 deletions

View File

@ -80,7 +80,7 @@ Object subclass: SIPResponse [
parameter: aPar ifAbsent: absent [
self parameters do: [:each |
each key = aPar ifTrue: [^ each value]].
(each key sameAs: aPar) ifTrue: [^ each value]].
^absent value.
]

View File

@ -25,7 +25,7 @@ TestCase subclass: SIPCallAgentTest [
^(WriteStream on: String new)
nextPutAll: 'SIP/2.0 302 Moved Temporarily'; cr; nl;
nextPutAll: 'Allow: INVITE, ACK'; cr; nl;
nextPutAll: 'Call-ID: '; nextPutAll: aCallId; cr; nl;
nextPutAll: 'Call-Id: '; nextPutAll: aCallId; cr; nl;
nextPutAll: 'Contact: sip:+12345678@10.8.254.1'; cr; nl;
nextPutAll: 'Content-Length: 0'; cr; nl;
nextPutAll: 'CSeq: 1 INVITE'; cr; nl;

View File

@ -190,6 +190,7 @@ PP.PPCompositeParserTest subclass: SIPParserTest [
self assert: (auth at: 'nonce') equals: '373ef30b297545cbce99fad09f1409cb.1392124197'.
self assert: (auth at: 'stale').
self assert: (auth at: 'algorithm') equals: 'MD5'.
self assert: (res parameter: 'cAlL-Id') equals: 'fc0f7969-8b91-e311-8101-844bf52a8297@xiaoyu'.
]
authorizationData [