tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dynamic content with bozohttpd



Am 11.10.13 20:35, schrieb Jochen Kunz:

>> Comments welcome.
> I really like it. It makes it easy to build some small HTTP driven
> alliances entirely with tools from base.
> 
> Take somthing like a Raspberry Pi, Beaglebone(Black), Olinuxino, ...,
> connect it to your home network, connect somthing like the room lights,
> the heating, temperature sensors, power meters, ... to the gpio(4) pins
> of the thing, hack a litle Lua script to glue httpd(8) to the lua
> binding of gpio(4) and you can control it from your desktop machine or
> smart phone via a simple web interface.
> 
> How to get POST data from within a Lua handler?

The idea is to parse the request and decode POST data in the C code and
pass this as a third table to the Lua function.  For now I think it's
about reading CONTENT_LENGTH bytes from stdin and do the decoding
"manually".

Once query variables are passed in a table, it will get quite handy.

> 
> What about PATH_INFO when GETing
> http://<hostname>/rest/printenv/foo/bar
> 

I added PATH_INFO, see my new diff that I just mailed out.



Home | Main Index | Thread Index | Old Index