vost icon indicating copy to clipboard operation
vost copied to clipboard

Headers are not always fully parsed

Open pepve opened this issue 13 years ago • 1 comments

If traffic gets fragmented, only the first fragment is parsed for headers. If the Host header is not in the first fragment, the request is not handled. Example:

(echo -n $'GET / HTTP/1.1\r\n'; sleep 2; echo -n $'Host: test\r\n\r\n') | nc -q 1 vost 80

pepve avatar Apr 18 '12 19:04 pepve

Very true. I think that could be fixed by buffering request data up until a setable amount of bytes and repeatedly search for the host. If the host is not found in that amount of data, the request could be ignored or treated as "host not found", which has to be added anyway ;)

kommander avatar Apr 18 '12 20:04 kommander