[Home]

Summary:ASTERISK-02378: [patch] SIP Headers - Modified Format Handler
Reporter:Joshua C. Colp (jcolp)Labels:
Date Opened:2004-09-09 20:21:48Date Closed:2008-01-15 15:07:09.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip_headers.diff.txt
Description:This patch changes the way that asterisk retrieves a header value using the get_header function. Asterisk expects to receive the name with the ':' symbol immediately after, this is not the case with some SIP devices however. This patch allows asterisk to search for the ':' symbol in the entire string. I would appreciate if people would test this, it has been fine for me. As well - I do have a disclaimer on file if this makes it into the CVS.
Comments:By: Mark Spencer (markster) 2004-09-09 21:42:42

RFC 3261, Section 7.3.1 states:

<pre>
  The formal grammar for a message-header specified in Section 25
  allows for an arbitrary amount of whitespace on either side of the
  colon; however, implementations should avoid spaces between the field
  name and the colon and use a single space (SP) between the colon and
  the field-value.

     Subject:            lunch
     Subject      :      lunch
     Subject            :lunch
     Subject: lunch

  Thus, the above are all valid and equivalent, but the last is the
  preferred form.
</pre>

I would only want to turn on the extra overhead of handling the whitespace between the : and the header name if "pedantic" is on.

By: Mark Spencer (markster) 2004-09-09 22:01:06

Okay fixed in CVS if pedantic checking is turned on.

By: Digium Subversion (svnbot) 2008-01-15 15:07:09.000-0600

Repository: asterisk
Revision: 3756

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r3756 | markster | 2008-01-15 15:07:09 -0600 (Tue, 15 Jan 2008) | 2 lines

Handle both pre- and post- whitespace if pedantic checking is on (bug ASTERISK-2378)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3756