[asterisk-bugs] [Asterisk 0018186]: Malformed XML response

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Oct 22 13:14:34 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18186 
====================================================================== 
Reported By:                nivaldomjunior
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18186
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.8 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-10-22 07:53 CDT
Last Modified:              2010-10-22 13:14 CDT
====================================================================== 
Summary:                    Malformed XML response
Description: 
Using the AJAM and XML to access the manager interface we receive a
malformed XML response.
We tested using a java and a php application, and both had received the
ajax response with error. The final tag </ajax-response> is not there.

We tested using the browser and the results are:

Chrome - Didn't worked. No </ajax-response> tag:
<ajax-response> 
<response type='object' id='unknown'><generic response='Success'
message='Authentication accepted' /></response> 

Safari - Didn't worked. The </ajax-response> tag is there, but is not
complete. The > is not there:
<ajax-response>
<response type='object' id='unknown'><generic response='Success'
message='Authentication accepted' /></response>
</ajax-response

Firefox - Worked. The XML response is complete:

?
<ajax-response>
?
<response type="object" id="unknown">
<generic response="Success" message="Queue summary will follow"/>
</response>
?
<response type="object" id="unknown">
<generic event="QueueSummary" queue="Fila-Unimed" loggedin="0"
available="0" callers="0" holdtime="0" talktime="0" longestholdtime="0"/>
</response>
?
<response type="object" id="unknown">
<generic event="QueueSummary" queue="fila-unimed-nne" loggedin="0"
available="0" callers="0" holdtime="0" talktime="0" longestholdtime="0"/>
</response>
?
<response type="object" id="unknown">
<generic event="QueueSummaryComplete"/>
</response>
</ajax-response>


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

---------------------------------------------------------------------- 
 (0128332) nivaldomjunior (reporter) - 2010-10-22 13:14
 https://issues.asterisk.org/view.php?id=18186#c128332 
---------------------------------------------------------------------- 
I colected the packages on 1.6 and on 1.8.

That's the result:

Asterisk 1.6: It sends the content type on the same package of the XML:

17:21:36.878366 IP (tos 0x0, ttl 64, id 15773, offset 0, flags [DF], proto
TCP (6), length 187) voxeasy.omniorb > bd.62742: P, cksum 0x41b0 (correct),
1:136(135) ack 481 win 215 <nop,nop,timestamp 114468092 965905716>
	0x0000:  0050 56c0 0008 000c 296e 7f8f 0800 4500  .PV.....)n....E.
	0x0010:  00bb 3d9d 4000 4006 67f0 ac10 1e8e ac10  ..=. at .@.g.......
	0x0020:  1e01 1f98 f516 71b4 9967 f171 493e 8018  ......q..g.qI>..
	0x0030:  00d7 41b0 0000 0101 080a 06d2 a4fc 3992  ..A...........9.
	0x0040:  8d34 4854 5450 2f31 2e31 2032 3030 204f  .4HTTP/1.1.200.O
	0x0050:  4b0d 0a53 6572 7665 723a 2041 7374 6572  K..Server:.Aster
	0x0060:  6973 6b2f 312e 362e 312e 3130 0d0a 4461  isk/1.6.1.10..Da
	0x0070:  7465 3a20 5375 6e2c 2031 3020 4f63 7420  te:.Sun,.10.Oct.
	0x0080:  3230 3130 2032 303a 3231 3a33 3620 4252  2010.20:21:36.BR
	0x0090:  540d 0a43 6f6e 6e65 6374 696f 6e3a 2063  T..Connection:.c
	0x00a0:  6c6f 7365 0d0a 4361 6368 652d 436f 6e74  lose..Cache-Cont
	0x00b0:  726f 6c3a 206e 6f2d 6361 6368 652c 206e  rol:.no-cache,.n
	0x00c0:  6f2d 7374 6f72 650d 0a                   o-store..
17:21:36.878597 IP (tos 0x0, ttl 64, id 49932, offset 0, flags [DF], proto
TCP (6), length 52) bd.62742 > voxeasy.omniorb: ., cksum 0x1476 (correct),
481:481(0) ack 136 win 65535 <nop,nop,timestamp 965905716 114468092>
	0x0000:  000c 296e 7f8f 0050 56c0 0008 0800 4500  ..)n...PV.....E.
	0x0010:  0034 c30c 4000 4006 e307 ac10 1e01 ac10  .4.. at .@.........
	0x0020:  1e8e f516 1f98 f171 493e 71b4 99ee 8010  .......qI>q.....
	0x0030:  ffff 1476 0000 0101 080a 3992 8d34 06d2  ...v......9..4..
	0x0040:  a4fc                                     ..
17:21:36.878655 IP (tos 0x0, ttl 64, id 15774, offset 0, flags [DF], proto
TCP (6), length 313) voxeasy.omniorb > bd.62742: P, cksum 0xef61 (correct),
136:397(261) ack 481 win 215 <nop,nop,timestamp 114468092 965905716>
	0x0000:  0050 56c0 0008 000c 296e 7f8f 0800 4500  .PV.....)n....E.
	0x0010:  0139 3d9e 4000 4006 6771 ac10 1e8e ac10  .9=. at .@.gq......
	0x0020:  1e01 1f98 f516 71b4 99ee f171 493e 8018  ......q....qI>..
	0x0030:  00d7 ef61 0000 0101 080a 06d2 a4fc 3992  ...a..........9.
	0x0040:  8d34 436f 6e74 656e 742d 7479 7065 3a20  .4Content-type:.
	0x0050:  7465 7874 2f78 6d6c 0d0a 4361 6368 652d  text/xml..Cache-
	0x0060:  436f 6e74 726f 6c3a 206e 6f2d 6361 6368  Control:.no-cach
	0x0070:  653b 0d0a 5365 742d 436f 6f6b 6965 3a20  e;..Set-Cookie:.
	0x0080:  6d61 6e73 6573 7369 6f6e 5f69 643d 2236  mansession_id="6
	0x0090:  3838 3137 6162 3422 3b20 5665 7273 696f  8817ab4";.Versio
	0x00a0:  6e3d 2231 223b 204d 6178 2d41 6765 3d36  n="1";.Max-Age=6
	0x00b0:  300d 0a0d 0a3c 616a 6178 2d72 6573 706f  0....<ajax-respo
	0x00c0:  6e73 653e 0a3c 7265 7370 6f6e 7365 2074  nse>.<response.t
	0x00d0:  7970 653d 276f 626a 6563 7427 2069 643d  ype='object'.id=
	0x00e0:  2775 6e6b 6e6f 776e 273e 3c67 656e 6572  'unknown'><gener
	0x00f0:  6963 2072 6573 706f 6e73 653d 2753 7563  ic.response='Suc
	0x0100:  6365 7373 2720 6d65 7373 6167 653d 2741  cess'.message='A
	0x0110:  7574 6865 6e74 6963 6174 696f 6e20 6163  uthentication.ac
	0x0120:  6365 7074 6564 2720 2f3e 3c2f 7265 7370  cepted'./></resp
	0x0130:  6f6e 7365 3e0a 3c2f 616a 6178 2d72 6573  onse>.</ajax-res
	0x0140:  706f 6e73 653e 0a                        ponse>.


Asterisk 1.8: It sends the content type on a package before the XML
package:

14:15:14.311599 IP (tos 0x0, ttl 64, id 3389, offset 0, flags [DF], proto
TCP (6), length 344) maquinavirtual.local.omniorb >
MacBook-Pro-de-Nivaldo-Junior.local.62717: P, cksum 0xf8db (correct),
1:293(292) ack 508 win 215 <nop,nop,timestamp 6130134 965903770>
	0x0000:  0023 32bf 2f58 000c 2935 cf23 0800 4500 
.https://issues.asterisk.org/view.php?id=2./X..)5.#..E.
	0x0010:  0158 0d3d 4000 4006 dee2 c0a8 e61e c0a8  .X.=@. at .........
	0x0020:  e610 1f98 f4fd f94f 84ea c9eb 7ee3 8018  .......O....~...
	0x0030:  00d7 f8db 0000 0101 080a 005d 89d6 3992  ...........]..9.
	0x0040:  859a 4854 5450 2f31 2e31 2032 3030 204f  ..HTTP/1.1.200.O
	0x0050:  4b0d 0a53 6572 7665 723a 2041 7374 6572  K..Server:.Aster
	0x0060:  6973 6b2f 312e 382e 300d 0a44 6174 653a  isk/1.8.0..Date:
	0x0070:  2046 7269 2c20 3232 204f 6374 2032 3031  .Fri,.22.Oct.201
	0x0080:  3020 3137 3a31 353a 3134 2047 4d54 0d0a  0.17:15:14.GMT..
	0x0090:  436f 6e6e 6563 7469 6f6e 3a20 636c 6f73  Connection:.clos
	0x00a0:  650d 0a43 6163 6865 2d43 6f6e 7472 6f6c  e..Cache-Control
	0x00b0:  3a20 6e6f 2d63 6163 6865 2c20 6e6f 2d73  :.no-cache,.no-s
	0x00c0:  746f 7265 0d0a 436f 6e74 656e 742d 4c65  tore..Content-Le
	0x00d0:  6e67 7468 3a20 3134 360d 0a43 6f6e 7465  ngth:.146..Conte
	0x00e0:  6e74 2d74 7970 653a 2074 6578 742f 786d  nt-type:.text/xm
	0x00f0:  6c0d 0a43 6163 6865 2d43 6f6e 7472 6f6c  l..Cache-Control
	0x0100:  3a20 6e6f 2d63 6163 6865 3b0d 0a53 6574  :.no-cache;..Set
	0x0110:  2d43 6f6f 6b69 653a 206d 616e 7365 7373  -Cookie:.mansess
	0x0120:  696f 6e5f 6964 3d22 3531 3238 3034 3939  ion_id="51280499
	0x0130:  223b 2056 6572 7369 6f6e 3d31 3b20 4d61  ";.Version=1;.Ma
	0x0140:  782d 4167 653d 3630 0d0a 5072 6167 6d61  x-Age=60..Pragma
	0x0150:  3a20 5375 7070 7265 7373 4576 656e 7473  :.SuppressEvents
	0x0160:  0d0a 0d0a 0d0a                           ......
14:15:14.311744 IP (tos 0x0, ttl 64, id 3390, offset 0, flags [DF], proto
TCP (6), length 198) maquinavirtual.local.omniorb >
MacBook-Pro-de-Nivaldo-Junior.local.62717: FP, cksum 0xfb08 (correct),
293:439(146) ack 508 win 215 <nop,nop,timestamp 6130134 965903770>
	0x0000:  0023 32bf 2f58 000c 2935 cf23 0800 4500 
.https://issues.asterisk.org/view.php?id=2./X..)5.#..E.
	0x0010:  00c6 0d3e 4000 4006 df73 c0a8 e61e c0a8  ...>@. at ..s......
	0x0020:  e610 1f98 f4fd f94f 860e c9eb 7ee3 8019  .......O....~...
	0x0030:  00d7 fb08 0000 0101 080a 005d 89d6 3992  ...........]..9.
	0x0040:  859a 3c61 6a61 782d 7265 7370 6f6e 7365  ..<ajax-response
	0x0050:  3e0a 3c72 6573 706f 6e73 6520 7479 7065  >.<response.type
	0x0060:  3d27 6f62 6a65 6374 2720 6964 3d27 756e  ='object'.id='un
	0x0070:  6b6e 6f77 6e27 3e3c 6765 6e65 7269 6320  known'><generic.
	0x0080:  7265 7370 6f6e 7365 3d27 5375 6363 6573  response='Succes
	0x0090:  7327 206d 6573 7361 6765 3d27 4175 7468  s'.message='Auth
	0x00a0:  656e 7469 6361 7469 6f6e 2061 6363 6570  entication.accep
	0x00b0:  7465 6427 202f 3e3c 2f72 6573 706f 6e73  ted'./></respons
	0x00c0:  653e 0a3c 2f61 6a61 782d 7265 7370 6f6e  e>.</ajax-respon
	0x00d0:  7365 3e0a                                se>. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-22 13:14 nivaldomjunior Note Added: 0128332                          
======================================================================




More information about the asterisk-bugs mailing list