Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers are not always fully parsed #2

Open
pepve opened this issue Apr 18, 2012 · 1 comment
Open

Headers are not always fully parsed #2

pepve opened this issue Apr 18, 2012 · 1 comment

Comments

@pepve
Copy link

pepve commented Apr 18, 2012

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
@kommander
Copy link
Owner

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants