[Home]

Summary:ASTERISK-02842: [PATCH] SIP header continuation line parsing not conformant to RFC
Reporter:khb (khb)Labels:
Date Opened:2004-11-17 09:58:56.000-0600Date Closed:2008-01-15 15:14:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.c_lws2sws_patch.txt
Description:lws2sws() does not parse SIP header continuation lines in accordance with RFC 3261.
Client reports failed registrations with SIPQuest equipment.
SIPQuest equipment sends WWW-Authenticate headers broken into several lines starting with TAB character. lws2sws only accepts SPACE at continuation line start.
PATCH attached, clients reports successful registrations.
Patch also removes lws2sws from pedantic option, should always be in standard processing, since it's an RFC requirement.
Disclaimed...

****** STEPS TO REPRODUCE ******

See [Asterisk-Users] 2004-11-16, "SIP register problem"

****** ADDITIONAL INFORMATION ******

RFC3261:
 SIP header field values can be folded onto multiple lines if the
 continuation line begins with a space or horizontal tab.  All linear
 white space, including folding, has the same semantics as SP.  A
 recipient MAY replace any linear white space with a single SP before
 interpreting the field value or forwarding the message downstream.
 This is intended to behave exactly as HTTP/1.1 as described in RFC
 2616 [8].  The SWS construct is used when linear white space is
 optional, generally between tokens and separators.

    LWS  =  [*WSP CRLF] 1*WSP ; linear whitespace
    SWS  =  [LWS] ; sep whitespace
Comments:By: Brian West (bkw918) 2004-11-17 10:07:30.000-0600

wasn't this what pedantic=yes was for?

bkw

By: Mark Spencer (markster) 2004-11-17 23:17:34.000-0600

Thanks, fixed in CVS, but we DO require pedantic checking to enable this rediculus parsing since virtually no implementations actually impose this extra parsing performance hit upon us.

By: Russell Bryant (russell) 2004-11-17 23:26:48.000-0600

fixed in 1.0 - will be in 1.0.3

By: Digium Subversion (svnbot) 2008-01-15 15:14:20.000-0600

Repository: asterisk
Revision: 4291

U   branches/v1-0/channels/chan_sip.c

------------------------------------------------------------------------
r4291 | russell | 2008-01-15 15:14:19 -0600 (Tue, 15 Jan 2008) | 2 lines

fix continuation line parsing (bug ASTERISK-2842)

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

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