POST XML data returns HTTP/1.0 501 Not Implemented error

fred9595

New Member
I have tried following code successfully on my x86 machine. No error is encountered and a table is shown up with data extracted from data.xml. (Flexigrid is a library for displaying tables.) \[code\][10:37:42.196] POST http://localhost/data.xml [HTTP/1.1 200 OK 1ms]\[/code\] message is received in logs of firefox. \[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Flexigrid</title><link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/10425837/css/flexigrid.css"><script type="text/javascript" src="http://stackoverflow.com/questions/jquery.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/10425837/js/flexigrid.js"></script></head><body><table id="flex1" style="display:none"></table><script type="text/javascript">$("#flex1").flexigrid({ url: '../data.xml', dataType: 'xml', colModel : [ {display: 'Ports', name : 'port', width : 50, sortable : true}, {display: 'Rx bytes', name : 'rx_bytes', width : 50, sortable : true}, {display: 'Rx drop', name : 'rx_drop', width : 50, sortable : true}, {display: 'Rx errs', name : 'rx_errs', width : 50, sortable : true}, {display: 'Rx frame', name : 'rx_frame', width : 50, sortable : true}, {display: 'Rx over', name : 'rx_over', width : 50, sortable : true}, {display: 'Rx CRC', name : 'rx_crc', width : 50, sortable : true}, {display: 'Tx pkts', name : 'tx_pkts', width : 50, sortable : true}, {display: 'Tx bytes', name : 'tx_bytes', width : 50, sortable : true}, {display: 'Tx drop', name : 'tx_drop', width : 50, sortable : true}, {display: 'Tx errs', name : 'tx_errs', width : 50, sortable : true}, {display: 'Tx coll', name : 'tx_coll', width : 50, sortable : true} ], sortname: "port", sortorder: "asc", usepager: false, useRp: true, rp: 15, showTableToggleBtn: true, width: 746, onSubmit: addFormData, height: 200});function addFormData(){ //passing a form object to serializeArray will get the valid data from all the objects, but, if the you pass a non-form object, you have to specify the input elements that the data will come from var dt = $('#sform').serializeArray(); $("#flex1").flexOptions({params: dt}); return true;}$('#sform').submit(function (){ $('#flex1').flexOptions({newp: 1}).flexReload(); return false;});</script></body></html>\[/code\]But when I try same code on an ARM based switch, an empty flexigrid table appears. data.xml in this case was found to be exactly same as that of x86 machine. However, in the logs of firefox I got following message: \[code\][10:24:57.611] POST http://192.168.3.1/data.xml [HTTP/1.0 501 Not Implemented 3ms]\[/code\]where 192.168.3.1 is the switch's IP. What does HTTP/1.0 501 Not Implemented exactly refer to? Anyone know a way to solve this problem?Update:
Just noticed that on my x86 machine if I browse http://localhost/data.xml, contents of the xml get appear in firefox but if I browse the data.xml on server as http://192.168.3.1/data.xml, the file data.xml gets downloaded instead of showing up in firefox.
 
Back
Top