|Summary:||ASTERISK-17877: [patch] Last character of XML data gets cut off, in mxml interface|
|Reporter:||Jakob Borg (jborg)||Labels:|
|Date Opened:||2011-05-18 04:25:32||Date Closed:||2011-09-16 15:20:21|
|Environment:||Attachments:||( 0) http.c.patch|
|Description:||When using the mxml interface of the HTTP manager, a typical response can look like this:|
<response type='object' id='unknown'><generic response='Error' message='Permission denied' /></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>
|Comments:||By: Jakob Borg (jborg) 2011-05-18 04:43:31|
... which broke serving static files, since the headers weren't newline-terminated there. This fixes both issues:
<inline code removed by lmadsen>
By: Leif Madsen (lmadsen) 2011-05-18 15:15:12
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!
By: Jakob Borg (jborg) 2011-05-19 02:14:17
Right. Uploaded, and the license was signed yesterday but is pending.
By: Sean Bright (seanbright) 2011-09-16 15:04:15.181-0500
This appears to be correct in SVN in 1.8, 10 and trunk. I don't think any change is required.
By: Malcolm Davenport (mdavenport) 2011-09-16 15:20:21.641-0500
Fixed in r309209, from issue: