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

Suppress 400 if client disconnected (mk 2) #20

Merged
merged 3 commits into from
Sep 18, 2011

Conversation

athomason
Copy link
Contributor

This updates #18, more correctly this time. This is a new pull requests github didn't pull the latest commit into that one.

miyagawa added a commit that referenced this pull request Sep 18, 2011
Suppress 400 if client disconnected (mk 2)
@miyagawa miyagawa merged commit 505bb86 into miyagawa:master Sep 18, 2011
@miyagawa
Copy link
Owner

Just a thought - is it possible to write a unit test for this?

@athomason
Copy link
Contributor Author

Sure, I've added one (845ceda) that tests that empty or incomplete-header requests followed by a shutdown(2) call cause Twiggy to not respond with anything. This doesn't cover the case where the client calls close(2), but since both events are seen as PIPE signals on the server side, that should be ok. A test that actually watches the wire with tcpdump or something (which is how I noticed this originally) seems rather more complicated than necessary.

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

Successfully merging this pull request may close these issues.

2 participants