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

receiveResponse function does not work when response is empty (i.e a head request) #102

Open
miladz68 opened this issue Feb 11, 2017 · 4 comments

Comments

@miladz68
Copy link

when I make a head request to a server the body that I receive is empty so the receiveResponse function does not work (it waits for a long time for the end of file, but there is none).

@miladz68
Copy link
Author

the server that I make the call to is Snap. I checked the code and it appears that the code gets stuck here https://hackage.haskell.org/package/http-streams-0.8.4.0/docs/src/Network-Http-Connection.html#receiveResponse at line Streams.skipToEof i' . It gets stuck there for some reason.

@istathar
Copy link
Member

I'm going to look at this, obviously, but I don't suppose you have a URL you're hitting that you could give to let us test against?

@miladz68
Copy link
Author

@afcowie
Unfortunately I cannot setup a server, I test it on my localhost.

@istathar
Copy link
Member

@miladz68 Ok. I was only asking because "can I see for myself" sounded a little better than "can you write a test case which demonstrates the problem?" But if the target server is written in Snap, then you could certainly write a test case into the http-streams test suite. If you do a pull request with that (failing) test I'll take it from there.

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

2 participants