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

ConnectionClosedByPeer vs IncompleteHeaders #52

Closed
kazu-yamamoto opened this issue Feb 17, 2012 · 9 comments
Closed

ConnectionClosedByPeer vs IncompleteHeaders #52

kazu-yamamoto opened this issue Feb 17, 2012 · 9 comments

Comments

@kazu-yamamoto
Copy link
Contributor

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

snoyberg added a commit that referenced this issue Mar 25, 2012
@snoyberg
Copy link
Member

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?

@kazu-yamamoto
Copy link
Contributor Author

I tried to build the environment but failed. I will try again when I can build the environment.

@gregwebs
Copy link
Member

let us know what your build failures are

@kazu-yamamoto
Copy link
Contributor Author

"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.

@kazu-yamamoto
Copy link
Contributor Author

It seems to me that warp 1.2 does not solve this problem. When a client terminates the connection, warp displays "IncompleteHeaders".

@snoyberg
Copy link
Member

snoyberg commented Apr 5, 2012

You mean that the client terminates the connection in the middle of a response body, or before sending any headers?

@kazu-yamamoto
Copy link
Contributor Author

Just before sending any headers (after getting one HTML by telnet).

@snoyberg
Copy link
Member

snoyberg commented Jul 9, 2012

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.

@kazu-yamamoto
Copy link
Contributor Author

I confirmed this works well and there is no leak of file descriptors. Let's close this issues.

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

No branches or pull requests

3 participants