NanoHttpd/nanohttpd — pull request #118 by rnentjes (2014-05-25 11:42:33+00:00)
Title: Fix headers not cleared between multiple requests on same connection (HT...

Hi,

The HTTPSession object will handle multiple requests on the same connection by calling execute in a loop. But it looks like the http headers are not cleaned up between requests.

For example; it a GET follows a POST (eg. favicon.ico) the headers will still contain an incorrect header-length, leading to a socket timeout as the server will be waiting for non existent data.

I think this simple fix will solve the problem. Unless there is a reason to keep the headers?

Cheers, Rien