|
From: | address@hidden |
Subject: | Re: [lwip-users] Get POST data from a netbuf (Netconn API) |
Date: | Mon, 1 Aug 2016 20:13:01 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
clement.deleurence wrote:
However, i don't know how to get POST data sent from my browser to the server. [..] With the code shows above, i get this in *buf*: [..] I read severals times that POST data are appended to the request header, after a double newline. However, i have nothing more to read than what you see above in *buf*.
Have you tried monitoring the wire (with wireshark)? Some Browsers send the headers in one packet and the body (POST data) in the next packet, which would mean you get the headers with the first 'netconn_recv()' and the POST data might come with the next 'netconn_recv()' (depending on the browser and the transmission, it might come with one call, too, TCP doesn't guarantee anything here).
In any case, there's a HTTP server supporting POST in our repository, although that one is written for the lwIP callback API.
Hope that helps, Simon
[Prev in Thread] | Current Thread | [Next in Thread] |