Summary:ASTERISK-04896: expires header parameter should be matched case-insensitively
Reporter:szuk (szuk)Labels:
Date Opened:2005-08-24 22:45:58Date Closed:2008-01-15 15:45:45.000-0600
Versions:Frequency of
Environment:Attachments:( 0) chan_sip_expires_case.diff
Description:chan_sip.c matches the "expires" parameter of contact headers using strstr, it should use strcasestr.  This bug was preventing user agents from unregistering because they passed "EXPIRES=0" as a contact parameter instead of "expires=0".


From rfc 3261 sec. 7.3.1:

When comparing header fields, field names are always case-
insensitive.  Unless otherwise stated in the definition of a
particular header field, field values, parameter names, and parameter
values are case-insensitive.  Tokens are always case-insensitive.
Unless specified otherwise, values expressed as quoted strings are
case-sensitive.  For example,

     Contact: <sip:alice@atlanta.com>;expires=3600

is equivalent to

     CONTACT: <sip:alice@atlanta.com>;ExPiReS=3600

Comments:By: szuk (szuk) 2005-08-24 22:52:12

Actually, it looks like a few of other comparisons should probably be case-insensitive, at least ones for "rport" and "maddr".

By: Olle Johansson (oej) 2005-08-25 01:25:04

Let's start with this one that actually stopped communication.

By: Michael Jerris (mikej) 2005-08-25 06:35:25

Do you have a disclaimer on file with digium?

By: szuk (szuk) 2005-08-25 09:59:49

Not yet, I have just emailed a disclaimer to bugs@digium.com.

By: szuk (szuk) 2005-08-25 18:21:51

I have received a response from digium that my disclaimer was received successfully.

By: Kevin P. Fleming (kpfleming) 2005-08-26 16:02:58

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:45:45.000-0600

Repository: asterisk
Revision: 6423

U   trunk/channels/chan_sip.c

r6423 | kpfleming | 2008-01-15 15:45:45 -0600 (Tue, 15 Jan 2008) | 2 lines

use case-insensitive comparisons for headears (issue ASTERISK-4896)