NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.

Home Page:http://nanohttpd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postData still contains the chunksize

StefanLobbenmeier opened this issue · comments

This might also be described in #293, but since that author did not provide as much detail I am creating a new issue.

My client is sending some xml data via a chunked HTTP message, see this screenshot from wireshark:
image

Now when I access the field postData in my server code I get this:

25e
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><--censored payload--></soapenv:Body></soapenv:Envelope>
0

As you can see, the chunksize before the XML is also contained in the postData:
image

The last 0 is another chunk of size zero, not sure why it is being sent:
image

I would expect the HTTP Server to unwrap the data instead of having to do that myself.

This is not a blocking issue for me, I just wanted to report it so it can be used as a reference. I wanted to use NanoHttpd as a reverse Proxy but ended up going with undertow instead since it has reverse proxy functionality built-in