]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http: fix 405,431,501 default errorfile
authorHuangbin Zhan <zhanhb88@gmail.com>
Tue, 28 Oct 2025 03:39:54 +0000 (11:39 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Oct 2025 07:47:19 +0000 (08:47 +0100)
A few typos were present in the default errorfiles for the status codes
above (missing dot at the end of the sentence, extra closing bracket).
This fixes them. This can be backported.

src/http.c

index 10522206d06c09a0f2cf1159b57eb66702503159..b58185a26a4360ddd2f5b3aba2882d28c5e8be48 100644 (file)
@@ -224,11 +224,11 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = {
 
        [HTTP_ERR_405] =
        "HTTP/1.1 405 Method Not Allowed\r\n"
-       "Content-length: 146\r\n"
+       "Content-length: 147\r\n"
        "Cache-Control: no-cache\r\n"
        "Content-Type: text/html\r\n"
        "\r\n"
-       "<html><body><h1>405 Method Not Allowed</h1>\nA request was made of a resource using a request method not supported by that resource\n</body></html>\n",
+       "<html><body><h1>405 Method Not Allowed</h1>\nA request was made of a resource using a request method not supported by that resource.\n</body></html>\n",
 
        [HTTP_ERR_407] =
        "HTTP/1.1 407 Unauthorized\r\n"
@@ -305,11 +305,11 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = {
 
        [HTTP_ERR_431] =
        "HTTP/1.1 431 Request Header Fields Too Large\r\n"
-       "Content-length: 106\r\n"
+       "Content-length: 105\r\n"
        "Cache-Control: no-cache\r\n"
        "Content-Type: text/html\r\n"
        "\r\n"
-       "<html><body><h1>431 Request Header Fields Too Large</h1>\n>Request Header Fields Too Large.\n</body></html>\n",
+       "<html><body><h1>431 Request Header Fields Too Large</h1>\nRequest Header Fields Too Large.\n</body></html>\n",
 
        [HTTP_ERR_500] =
        "HTTP/1.1 500 Internal Server Error\r\n"
@@ -321,11 +321,11 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = {
 
        [HTTP_ERR_501] =
        "HTTP/1.1 501 Not Implemented\r\n"
-       "Content-length: 136\r\n"
+       "Content-length: 135\r\n"
        "Cache-Control: no-cache\r\n"
        "Content-Type: text/html\r\n"
        "\r\n"
-       "<html><body><h1>501 Not Implemented</h1>\n.The server does not support the functionality required to fulfill the request.\n</body></html>\n",
+       "<html><body><h1>501 Not Implemented</h1>\nThe server does not support the functionality required to fulfill the request.\n</body></html>\n",
 
        [HTTP_ERR_502] =
        "HTTP/1.1 502 Bad Gateway\r\n"