-
Notifications
You must be signed in to change notification settings - Fork 262
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
ConnectionClosedByPeer vs IncompleteHeaders #52
Comments
I just pushed a commit for this. It's working on the new 1.2 code. Can you check this out when you have a chance? |
I tried to build the environment but failed. I will try again when I can build the environment. |
let us know what your build failures are |
"Failures" just meant that "cabal install" on the wai packages from github failed in my environment. I don't have enough time to build proper environment this week. Sorry. |
It seems to me that warp 1.2 does not solve this problem. When a client terminates the connection, warp displays "IncompleteHeaders". |
You mean that the client terminates the connection in the middle of a response body, or before sending any headers? |
Just before sending any headers (after getting one HTML by telnet). |
OK, I think I got it this time. If no data is read, ConnectionClosedByPeer is thrown. If some data is read, then it becomes IncompleteHeaders. |
I confirmed this works well and there is no leak of file descriptors. Let's close this issues. |
Since [1] deleted ConnectionClosedByPeer, we cannot distinguish ConnectionClosedByPeer and IncompleteHeaders. Are there any ways to distinguish them with Conduit?
One idea is that if a buffer is empty and pull returns null bytestring, we take it as ConnectionClosedByPeer. Does this make sense? Is it possible to implement this idea? (I'm not familiar to the internal of Conduit, so I cannot.)
[1] 70bb530
The text was updated successfully, but these errors were encountered: