Nginx and 400 SSL error handling

fostercarly nginx-forum at forum.nginx.org
Tue Nov 1 08:42:06 UTC 2022


The 400 (Bad Request) status code indicates that the server cannot or will
not process the request because the received syntax is invalid, nonsensical,
or exceeds some limitation on what the server is willing to process. It
means that the request itself has somehow incorrect or corrupted and the
server couldn't understand it. The server is refusing to service the request
because the entity of the request is in a format not supported by the
requested resource for the requested method . Therefore, it prevents the
website from being properly displayed. The main thing to understand is that
the 400 Bad Request error is a client-side error. 

The cause of  400 Bad Request error can be a wrongly written URL or a URL
that contains unrecognizable characters. Another cause of the error might be
an invalid or expired cookie. Also, if you try to upload a file that's too
large. If the server is programmed with a file size limit, then you might
encounter a 400 error.

Expired Client Certificate

This issue typically happens for a 2-Way TLS, when the certificate sent by
the client is expired. In a 2-way TLS, both client and server exchange their
public certificates to accomplish the handshake. The client validates the
server certificate and the server validates the client certificate. During
the TLS handshake if it is found that the client certificate is expired,
then the server will send 400 - Bad request with the message "The SSL
certificate error". The solution for this problem is that procure a new
certificate and upload the certificate

http://net-informations.com/q/mis/400.html

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284506,295640#msg-295640



More information about the nginx mailing list