[asterisk-dev] [Code Review] mxml puts quotes inside multiline opaque data
mjordan
reviewboard at asterisk.org
Fri Nov 11 08:43:11 CST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1577/#review4779
-----------------------------------------------------------
Ship it!
Looks good.
- mjordan
On Nov. 10, 2011, 3:08 p.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1577/
> -----------------------------------------------------------
>
> (Updated Nov. 10, 2011, 3:08 p.m.)
>
>
> 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/20111111/0fcc6c95/attachment.htm>
More information about the asterisk-dev
mailing list