[asterisk-dev] [Code Review] mxml puts quotes inside multiline opaque data

wdoekes reviewboard at asterisk.org
Thu Nov 10 15:08:49 CST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1577/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

See bug report. When switching to adding opaque data, the value is closed with a single quote and then the while loop re-enters, where the next lines are added. This causes the xml to look line opaque_data='line1'line2\nline3\n' instead of opaque_data='line1\nline2\nline3'.


This addresses bug ASTERISK-18852.
    https://issues.asterisk.org/jira/browse/ASTERISK-18852


Diffs
-----

  /branches/1.8/main/manager.c 344438 

Diff: https://reviewboard.asterisk.org/r/1577/diff


Testing
-------

Got the expected output:

$ cookie="`wget -O- 'http://127.0.0.1:8088/mxml?Action=Login&username=mark&secret=secret' --save-headers 2>/dev/null | grep Set-Cookie | sed -e 's/Set-//'`" ; wget -qO- 'http://127.0.0.1:8088/mxml?Action=Command&Command=core%20show%20channels' --header "$cookie"
<ajax-response>
<response type='object' id='unknown'><generic response='Follows' privilege='Command' opaque_data='Channel              Location             State   Application(Data)
0 active channels
0 active calls
0 calls processed
--END COMMAND--' /></response>
</ajax-response>


Thanks,

wdoekes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111110/8e7d4ab8/attachment.htm>


More information about the asterisk-dev mailing list