[asterisk-bugs] [Asterisk 0017326]: [patch] Computation of Content-Length is wrong under some circumstances

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jun 2 15:06:40 CDT 2010


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17326 
====================================================================== 
Reported By:                kenner
Assigned To:                mnicholson
====================================================================== 
Project:                    Asterisk
Issue ID:                   17326
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                       SWP-1451 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 262655 
Request Review:              
====================================================================== 
Date Submitted:             2010-05-12 10:14 CDT
Last Modified:              2010-06-02 15:06 CDT
====================================================================== 
Summary:                    [patch] Computation of Content-Length is wrong under
some circumstances
Description: 
add_sdp has a bug in the computation of Content-Length.  It first computes
the length by adding together the sizes of a large number of things, then
outputs the length, THEN the things.  That's error-prone if the computation
doesn't agree with what's written.  And, in fact, it doesn't, in some
cases. In each of the cases where it write a dummy media line, that line
isn't included into the count.  This causes interoperability issues with
the Polycom VSX 7000 since it checks the Content-Length.  I have the fairly
obvious patch to account for the length of these lines, but it just makes
the kludge of that part of the code worse.  My recommendation is to not use
add_line, but instead to build up a single string and then take the size of
that string for the header and then outut it.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-02 15:06 mnicholson     Status                   confirmed => assigned
2010-06-02 15:06 mnicholson     Assigned To               => mnicholson      
======================================================================




More information about the asterisk-bugs mailing list