[asterisk-bugs] [Asterisk 0019314]: Last character of XML data gets cut off, in mxml interface

Asterisk Bug Tracker noreply at bugs.digium.com
Wed May 18 15:15:12 CDT 2011


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19314 
====================================================================== 
Reported By:                jborg
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19314
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.3.3 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-18 04:25 CDT
Last Modified:              2011-05-18 15:15 CDT
====================================================================== 
Summary:                    Last character of XML data gets cut off, in mxml
interface
Description: 
When using the mxml interface of the HTTP manager, a typical response can
look like this:

---

<ajax-response>
<response type='object' id='unknown'><generic response='Error'
message='Permission denied' /></response>
</ajax-response
---

Note that the closing ">" in the last tag is missing. This causes parse
errors on the client side.

The problem is caused by an extra newline before the response, that is not
counted in the content-length. The newline in question exists because two
newlines are added between the HTTP headers and the body, but the the
headers are already newline-terminated. The following patch resolved the
problem:

<inline patch removed by lmadsen>
====================================================================== 

---------------------------------------------------------------------- 
 (0135123) lmadsen (administrator) - 2011-05-18 15:15
 https://issues.asterisk.org/view.php?id=19314#c135123 
---------------------------------------------------------------------- 
You can't place code inline like that. Please attach your patches to the
issue as a text file after signing the license agreement. Thanks! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-18 15:15 lmadsen        Note Added: 0135123                          
2011-05-18 15:15 lmadsen        Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list