GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I've cleaned up the test/httpTest.hs file a bit and removed most of the warnings.
The server is now started using forkIO instead of forkProces, because the process kept hanging on my machine if something went wrong and it wasn't properly killed.
Added a simple test case for Network.Browser to check if a vanilla request doesn't send any Cookie header (in preparation for future tests based around cookies).
Removed most warnings from test file.
Check if server returned 200 status code
Using forkIO instead of forkProcess, because the separate process kee…
Added testcase for Browser, vanilla HTTP request shouldn't send Cooki…
Does the separate process keep hanging even after my commits? I did try a bit to break it after those and couldn't.
forkIO does also have the advantage of working on Windows, but I'm also a bit suspicious of doing a network test inside a single process, so I'm a little torn on this.
Yes, I was testing using your commit.
If I run it nicely all the way through it works correctly, I think.
But I was doing some weird things like pressing Ctrl+C while running tests and running ghci inside of vim.
I guess there should also be a second set of tests that run against a real, full blown http server like apache, for more realistic tests.
But these httpd-shed based tests can be used to build "artificial" tests, like the cookie one in pull request 12.