https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412012-08-07T07:47:36Zlighty labsLighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=79172012-08-07T07:47:36Zspaam
<ul></ul><p>you know, you need to have double quotes on text strings..</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=79182012-08-07T10:39:26Zstbuehler
<ul><li><strong>Target version</strong> changed from <i>1.4.32</i> to <i>1.4.x</i></li></ul><p>JSON is <strong>NOT</strong> simpler to parse than what we have now. And JSON parsers (which of course are easy to use if present) are usually not available in shell scripts.</p>
<p>And we certainly are not going to change the current format, at least you should provide a patch which provides a new mode.<br />Also what spaam said :)</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=79192012-08-07T17:57:51ZXaos
<ul><li><strong>File</strong> <a href="/attachments/1376">mod_status.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1376/mod_status.patch">mod_status.patch</a> added</li></ul><p>stbuehler wrote:</p>
<blockquote>
<p>JSON is <strong>NOT</strong> simpler to parse than what we have now. And JSON parsers (which of course are easy to use if present) are usually not available in shell scripts.</p>
<p>And we certainly are not going to change the current format, at least you should provide a patch which provides a new mode.<br />Also what spaam said :)</p>
</blockquote>
<p>I'm sorry..it was to early in the morning ;) I've added a seperate format, double quotes, as well as jsonp support.<br />JSON/JSONP is simpler to parse by web-applications written in javascript/php/python, you can fetch the "object" directly and easily build monitoring apps e.g. with html+jquery/mootools. And of course it is not made for "oldschool" shell scripting.</p>
<p>Currently im not sure if the string handling is "corretly" in lighttpd style - i am using C only for lowlevel hardware development, so please be forgiving.</p>
<p>Attached the patch file - i hope it is correctly created..</p>
<a name="Usagehttplocalhostserver-statusjsonhttplocalhostserver-statusjsonpcallbackFunction"></a>
<h3 >Usage<br /><a class="external" href="http://localhost/server-status?json">http://localhost/server-status?json</a><br /><a class="external" href="http://localhost/server-status?jsonp=callbackFunction">http://localhost/server-status?jsonp=callbackFunction</a><a href="#Usagehttplocalhostserver-statusjsonhttplocalhostserver-statusjsonpcallbackFunction" class="wiki-anchor">¶</a></h3> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94302016-04-20T09:58:46Zgstrauss
<ul></ul><p>Xaos, still interested in this patch?</p>
<p>The jsonp callback needs to be url-decoded from the query string, and then xml-encoded into the response (or checked to contain only alphanumeric or underscore chars)</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94312016-04-20T10:04:57Zgstrauss
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-9 priority-4 priority-default closed" href="/issues/1689">Feature #1689</a>: Enhanced server-status page with xml output</i> added</li></ul> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94332016-04-20T10:46:53ZXaos
<ul></ul><p>gstrauss wrote:</p>
<blockquote>
<p>Xaos, still interested in this patch?</p>
</blockquote>
<p>I'm still interested but currently it has a very low priority for my part.<br />Generally i'm not familiar with the lighttpd core functions/framework - hence it will took too much time to modify the patch and apply the required url encoding/regex matching.</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94362016-04-21T09:22:30Zgstrauss
<ul><li><strong>File</strong> <a href="/attachments/1698">mod_status-json.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1698/mod_status-json.patch">mod_status-json.patch</a> added</li></ul><p>Xaos, please try the attached patch, which is based on yours, but updated to work off 'master' and to protect against cross-site scripting attacks (by checking/validating the jsonp parameter value from the query string). I have not tested this new patch besides compiling it.</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94762016-04-28T03:25:36Zgstrauss
<ul></ul><blockquote>
<p>Xaos, still interested in this patch?</p>
</blockquote>
<p>Please give my patch a try. Thanks.</p> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=94972016-05-01T06:09:24Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li><li><strong>Target version</strong> changed from <i>1.4.x</i> to <i>1.4.40</i></li></ul> Lighttpd - Feature #2432: Adding JSON Output support to mod_status (patch)https://redmine.lighttpd.net/issues/2432?journal_id=95652016-05-09T05:55:34Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li></ul>