-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Unrelated cookies results in 400 Bad request #296
Comments
Thank you! I just tried it locally and was unable to reproduce it. This, together with...
makes me suspect that this is an upstream problem in http/af, and the specific cookie that was being sent was triggering something in http/af. Do you know what the cookie might have been? Are you still able to reproduce this locally, perhaps with the other server that had been running locally at cc @anmonteiro in case you might know what could cause this. |
I wanted to try OCaml and Dream and had the following code:
When I visited http://localhost:8080 with Chrome, I expected to see a JSON response but instead I got a 400 Bad request. The log output showed the following:
17.08.23 20:22:42.466 Running at http://localhost:8080
17.08.23 20:22:42.466 Type Ctrl+C to stop
17.08.23 20:22:47.993 dream.http WARN HTTP (::1:55119): Bad request
After some back and forth I tried the request with curl from the command line instead and immediately got the correct response. I tried with Chrome again and still got the bad request response. I then tried the request with Postman and got the correct response again.
After some Googling I saw some comments about cookies and localhost and that clearing all cookies from Chrome had solved the issue. I tried this but it didn't work properly, I could still see that the cookies was there for localhost. After manually deleting the cookies on localhost the request went through and I got the correct response with Chrome as well.
The text was updated successfully, but these errors were encountered: