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:
parent
6f2a50603f
commit
dd874d294a
|
@ -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.
|
||||
]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 [
|
||||
|
|
Reference in New Issue