<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 06.12.2016 16:33, Ferry Huberts
wrote:<br>
</div>
<blockquote
cite="mid:ac21c3e2-ca4d-271b-b971-55f1564cb744@hupie.com"
type="cite">
<blockquote type="cite">i propose it would be better to have a
default setting "with
<br>
http-header:false" for downwards-compatibility, so the config
for olsr
<br>
wouldnt need to be changed (we are using olsr for years with
same config!)
<br>
if anyone wants to use the new "http-header" feature, (s)he can
enable
<br>
that..
<br>
</blockquote>
<br>
JSON servers must send HTTP headers, see
<a class="moz-txt-link-freetext" href="http://jsonapi.org/format/#content-negotiation-servers">http://jsonapi.org/format/#content-negotiation-servers</a>
<br>
<br>
So this is a correctness fix.
<br>
</blockquote>
<br>
omg, ok.<br>
so it might be better to correct the neigh.sh (and luci) command
dealing with http-headers instead of killing http-headers!?<br>
<br>
"tail" is my (bad) friend, for luci it could look like that:<br>
<br>
root@74-46-keller:~# grep 13 /usr/lib/lua/luci/controller/olsr.lua<br>
jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port ..
"|tail -n +13) 2>/dev/null" )<br>
jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " ..
v4_port .. "|tail -n +13) 2>/dev/null")<br>
<br>
<br>
<blockquote
cite="mid:ac21c3e2-ca4d-271b-b971-55f1564cb744@hupie.com"
type="cite">Although I now see that the current 'Content-Type' is
wrong.
<br>
I'll fix that in a minute.
<br>
<br>
</blockquote>
ok, that doenst bother freifunk nodes (at least our freifunk
systems). who or what system is able to use that?<br>
<br>
<blockquote
cite="mid:ac21c3e2-ca4d-271b-b971-55f1564cb744@hupie.com"
type="cite">
<br>
<blockquote type="cite">
<br>
Konsole output
<br>
root@113-77:~# echo /NetworkRoutes | nc 127.0.0.1 9090
<br>
{"pid": 1879,"systemTime": 1481035827,"timeSinceStartup":
<br>
1689342,"error": "404 Not Found"}
<br>
<br>
</blockquote>
<br>
Works for me.
<br>
The netjson plugin has its own port, 2005 by default.
<br>
<br>
</blockquote>
<br>
there is no port-2005 on my testrouter! but, im talking about
jsoninfo-plugin. <br>
no "netjson"-plugin available on package-repo, or on my buildserver
(make menuconfig).<br>
<br>
<title>Konsole output</title>
<div>
<span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">walter@freifunkvm:/srv2/lede/lede-20161124$
grep olsr .config | grep json
</span><br>
CONFIG_PACKAGE_luci0-olsr-to-net<span
style="font-weight:bold;color:#ff5454;background-color:#ffffff;">json</span><span
style="color:#000000;background-color:#ffffff;">=m
</span><br>
CONFIG_PACKAGE_olsrd-mod-<span
style="font-weight:bold;color:#ff5454;background-color:#ffffff;">json</span><span
style="color:#000000;background-color:#ffffff;">info=m</span><br>
<br>
</span></div>
you wrote:<br>
> fixes adjust txtinfo to not use http headers by default<br>
<br>
we are using txtinfo with <span
class="author-a-z70zz74z990c3s4clthz87zrz82z">collectd-mod-olsrd,
and it was still working with new olsr 0.9.5. <br>
i will compile your changes and hopefully we have a new software,
in a few days.<br>
</span>
</body>
</html>