Closed GoogleCodeExporter closed 9 years ago
Hmm. Accessing PUT data, that sounds odd to me.
Could you elaborate more on your use case, please?
How do you setup a handler (do you know the name of PUT-ted files beforehand or
do
you use wildcard), and why do you need to handle PUT request in the first place?
Original comment by valenok
on 27 May 2009 at 4:17
I am implementing a REST interface in an embedded application. The put data
needs to
be interpreted as an action to be executed inside of the embedded app.
See http://en.wikipedia.org/wiki/Representational_State_Transfer for more on
REST.
Original comment by streambr...@gmail.com
on 22 Jan 2010 at 9:19
You can process PUT totally in embedded mode - just catch MG_NEW_REQUEST event,
and do mg_read().
Original comment by valenok
on 7 Sep 2010 at 7:39
Are you saying something like this?
myEventHandler(...)
{
...
if( !strcmp(ri->request_method, "PUT") )
mg_read(conn, buf, 1024);
...
}
This does not work as the code inside mg_read skips everything for non-POST
request. So it PUT doesn't work for PUT.
if (strcmp(conn->request_info.request_method, "POST") == 0 &&
conn->consumed_content < conn->content_len) {
Original comment by amolta...@gmail.com
on 23 Sep 2010 at 4:44
Original issue reported on code.google.com by
streambr...@gmail.com
on 11 May 2009 at 8:39