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
Randomly receiving 400 bad request #715
Comments
Is the connection between chrome and nghttpx http/2? |
nghttpx may return 400 even with HTTP/2 frontend connection if backend connection is also HTTP/2, just in case. |
Between chrome and nghttpx and between nghttpx and apache I'm using HTTP/2. |
Unfortunately, this is not the INFO level log I mentioned. Try -LINFO option. |
In the attachment you can find the INFO level log. Please let me know if you need anything else. |
For some reason, it does not include INFO log. Could you remove --frontend-frame-debug option? |
I just removed the |
It is very strange. Do you have /etc/nghttpx/nghttpx.conf? |
I do, however, I haven't changed its contents.
|
Did you uncomment those lines? If it is not intended, please comment out them again. |
What I meant was that I was just pasting the uncommented lines in the file. I did not uncomment/comment out anything in the file. It is in its default state |
Well, if you don't use syslog for nghttpx, could you comment out errorlog-syslog=yes? |
I commented out that line and the info log is now in the attachment. The failed request is at the end. From what I have observed, the proxy accepts always the first request and on the second one it delivers code 400. The problem is not only with the second request. |
It looks like the backend connection is HTTP/1.1. |
I will check that. However, I can not understand why it works the first time and the second it doesn't. |
By changing the server port through which the proxy was communicating no request fails with 400 error. I opted to use port 80. There seems to be a protocol negotiation problem between the server and nghttpx when I use port 443 for backend. This is how I start the nghttpx now: |
If backend requires TLS, you need to specify |
I suggest you to use the configure file like |
|
Thanks, I ended up using a configuration file as suggested by @yaung |
I'm using nghttpx between a client and an apache server. When the client makes a request to the server through nghttpx, the client sometimes gets
400 Bad Request
and it sometimes doesn't. This happens also when making the same request. When making the request directly to the server I don't get400 Bad Request
.Client is Chrome Version 54.0.2840.59 (64-bit)
nghttpx version is v1.15.0
The nghttpx call is:
nghttpx --frontend-frame-debug --frontend=0.0.0.0,8080 --backend=127.0.0.1,443 <SSL_KEY> <SSL_CERT>
Attached are screenshots from Google Chrome's response headers.
When it fails these headers are shown
Otherwise in case of a successful request, these ones are shown
The text was updated successfully, but these errors were encountered: