You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I just tried it locally and was unable to reproduce it. This, together with...
the lack of stack trace,
the lack of any Dream code in the example that could trigger an exception or construct a Bad Request response,
and that the string "Bad request" with that exact capitalization is generated by Dream only in response to http/af errors,
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 localhost:3000?
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: