uhttpd problems

In CGI scripts, the QUERY_STRING variable is not always set correctly.

Steps to reproduce

Observed Behaviour / Results

With Firefox 56 as HTTP client, the first response looks like:
begin

end
All subsequent requests will be answered correctly.
Wait 5 minutes, do another request; this 'first' request will be empty again,
then, everything is fine.

In another script I saw this list of strings for QUERY_STRING where the request was "?status"
HTTP_ACCEPT_LANGUAGE=de,en;q=0.5
.sh
te
n/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Deterministic Reproduction

With wget, we get deterministic results:
wget  --user=asdf --password=asdf -O - -q http://192.168.1.1/cgi-bin/querystring.sh?asdf
wget  --user=asdf --password=asdf -O - -q http://192.168.1.1/cgi-bin/querystring.sh?asdfasdf
wget  --user=asdf --password=asdf -O - -q http://192.168.1.1/cgi-bin/querystring.sh?asdfasdfasdf
wget  --user=asdf --password=asdf -O - -q http://192.168.1.1/cgi-bin/querystring.sh?asdfasdfasdfasdf
Here, the response is either missing the QUERY_STRING (=empty), or correctly visible.
This is dependent on the length of the query string.
With a changed password (hash) in the configuration, that specific length changes!
For the examples above, the first three result in an empty response; only the last one
returns the expected behaviour.