From ede92f01c0ac0689c80c7c7f73c2b32fe0ec6be8 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Fri, 23 Jan 2026 23:04:02 +0100 Subject: [PATCH 1/4] MINOR: tell git to use LF end of files for *.http files ML details: https://www.mail-archive.com/haproxy@formilux.org/msg46454.html --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 4b566452d9b7..7c1e779c003b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ SUBVERS export-subst VERDATE export-subst *.[ch] diff=cpp + +*.http text eol=lf From e1af38d2a4073352238dfc4cf60f90168405a9df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Jan 2026 22:10:10 +0000 Subject: [PATCH 2/4] Initial plan From c16d0f429bd1f950fb434a6d42ca16e557791e66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Jan 2026 22:11:55 +0000 Subject: [PATCH 3/4] Initial plan: Remove unnecessary cache-control headers from error responses Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com> --- examples/errorfiles/400.http | 10 +++++----- examples/errorfiles/403.http | 10 +++++----- examples/errorfiles/408.http | 10 +++++----- examples/errorfiles/500.http | 10 +++++----- examples/errorfiles/502.http | 10 +++++----- examples/errorfiles/503.http | 10 +++++----- examples/errorfiles/504.http | 10 +++++----- reg-tests/http-errorfiles/errors/400-1.http | 12 ++++++------ reg-tests/http-errorfiles/errors/400-2.http | 12 ++++++------ reg-tests/http-errorfiles/errors/400-3.http | 12 ++++++------ reg-tests/http-errorfiles/errors/400.http | 12 ++++++------ reg-tests/http-errorfiles/errors/403-1.http | 12 ++++++------ reg-tests/http-errorfiles/errors/403-2.http | 12 ++++++------ reg-tests/http-errorfiles/errors/403.http | 12 ++++++------ reg-tests/http-errorfiles/errors/404-1.http | 12 ++++++------ reg-tests/http-errorfiles/errors/404-2.http | 12 ++++++------ reg-tests/http-errorfiles/errors/404-3.http | 12 ++++++------ reg-tests/http-errorfiles/errors/404.http | 12 ++++++------ reg-tests/http-errorfiles/errors/500-1.http | 12 ++++++------ reg-tests/http-errorfiles/errors/500.http | 12 ++++++------ 20 files changed, 113 insertions(+), 113 deletions(-) diff --git a/examples/errorfiles/400.http b/examples/errorfiles/400.http index e223e38d99e3..d6c88501a827 100644 --- a/examples/errorfiles/400.http +++ b/examples/errorfiles/400.http @@ -1,8 +1,8 @@ -HTTP/1.0 400 Bad request -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 400 Bad request +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

400 Bad request

Your browser sent an invalid request. diff --git a/examples/errorfiles/403.http b/examples/errorfiles/403.http index a67e807550e4..21fbfa4e5f7f 100644 --- a/examples/errorfiles/403.http +++ b/examples/errorfiles/403.http @@ -1,8 +1,8 @@ -HTTP/1.0 403 Forbidden -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 403 Forbidden +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

403 Forbidden

Request forbidden by administrative rules. diff --git a/examples/errorfiles/408.http b/examples/errorfiles/408.http index aafb1300fb13..844f6006a980 100644 --- a/examples/errorfiles/408.http +++ b/examples/errorfiles/408.http @@ -1,8 +1,8 @@ -HTTP/1.0 408 Request Time-out -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 408 Request Time-out +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

408 Request Time-out

Your browser didn't send a complete request in time. diff --git a/examples/errorfiles/500.http b/examples/errorfiles/500.http index 9c3be965c07f..3e60a6658bb4 100644 --- a/examples/errorfiles/500.http +++ b/examples/errorfiles/500.http @@ -1,8 +1,8 @@ -HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 500 Internal Server Error +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

500 Internal Server Error

An internal server error occurred. diff --git a/examples/errorfiles/502.http b/examples/errorfiles/502.http index 94b35d49284a..5712d12e05ce 100644 --- a/examples/errorfiles/502.http +++ b/examples/errorfiles/502.http @@ -1,8 +1,8 @@ -HTTP/1.0 502 Bad Gateway -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 502 Bad Gateway +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

502 Bad Gateway

The server returned an invalid or incomplete response. diff --git a/examples/errorfiles/503.http b/examples/errorfiles/503.http index 48fde5881e68..367d4254fa5e 100644 --- a/examples/errorfiles/503.http +++ b/examples/errorfiles/503.http @@ -1,8 +1,8 @@ -HTTP/1.0 503 Service Unavailable -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 503 Service Unavailable +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

503 Service Unavailable

No server is available to handle this request. diff --git a/examples/errorfiles/504.http b/examples/errorfiles/504.http index f92518414c95..a788ce5f2efd 100644 --- a/examples/errorfiles/504.http +++ b/examples/errorfiles/504.http @@ -1,8 +1,8 @@ -HTTP/1.0 504 Gateway Time-out -Cache-Control: no-cache -Connection: close -Content-Type: text/html - +HTTP/1.0 504 Gateway Time-out +Cache-Control: no-cache +Connection: close +Content-Type: text/html +

504 Gateway Time-out

The server didn't respond in time. diff --git a/reg-tests/http-errorfiles/errors/400-1.http b/reg-tests/http-errorfiles/errors/400-1.http index 86a2e693dbe6..71ebd145ef04 100644 --- a/reg-tests/http-errorfiles/errors/400-1.http +++ b/reg-tests/http-errorfiles/errors/400-1.http @@ -1,9 +1,9 @@ -HTTP/1.1 400 Bad request -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-1 - +HTTP/1.1 400 Bad request +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-1 +

400 Bad request

Your browser sent an invalid request. diff --git a/reg-tests/http-errorfiles/errors/400-2.http b/reg-tests/http-errorfiles/errors/400-2.http index c10851036d3c..9132a92ca94c 100644 --- a/reg-tests/http-errorfiles/errors/400-2.http +++ b/reg-tests/http-errorfiles/errors/400-2.http @@ -1,9 +1,9 @@ -HTTP/1.1 400 Bad request -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-2 - +HTTP/1.1 400 Bad request +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-2 +

400 Bad request

Your browser sent an invalid request. diff --git a/reg-tests/http-errorfiles/errors/400-3.http b/reg-tests/http-errorfiles/errors/400-3.http index 1fe18410b02b..7565d0c03bfd 100644 --- a/reg-tests/http-errorfiles/errors/400-3.http +++ b/reg-tests/http-errorfiles/errors/400-3.http @@ -1,9 +1,9 @@ -HTTP/1.1 400 Bad request -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-3 - +HTTP/1.1 400 Bad request +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-3 +

400 Bad request

Your browser sent an invalid request. diff --git a/reg-tests/http-errorfiles/errors/400.http b/reg-tests/http-errorfiles/errors/400.http index ce229aa9f100..6913ec9cd1fc 100644 --- a/reg-tests/http-errorfiles/errors/400.http +++ b/reg-tests/http-errorfiles/errors/400.http @@ -1,9 +1,9 @@ -HTTP/1.1 400 Bad request -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: default - +HTTP/1.1 400 Bad request +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: default +

400 Bad request

Your browser sent an invalid request. diff --git a/reg-tests/http-errorfiles/errors/403-1.http b/reg-tests/http-errorfiles/errors/403-1.http index 08bdf02af295..480292b41877 100644 --- a/reg-tests/http-errorfiles/errors/403-1.http +++ b/reg-tests/http-errorfiles/errors/403-1.http @@ -1,9 +1,9 @@ -HTTP/1.0 403 Forbidden -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-1 - +HTTP/1.0 403 Forbidden +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-1 +

403 Forbidden

Request forbidden by administrative rules. diff --git a/reg-tests/http-errorfiles/errors/403-2.http b/reg-tests/http-errorfiles/errors/403-2.http index 9c07e5dd0a60..438ece3a757c 100644 --- a/reg-tests/http-errorfiles/errors/403-2.http +++ b/reg-tests/http-errorfiles/errors/403-2.http @@ -1,9 +1,9 @@ -HTTP/1.0 403 Forbidden -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-2 - +HTTP/1.0 403 Forbidden +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-2 +

403 Forbidden

Request forbidden by administrative rules. diff --git a/reg-tests/http-errorfiles/errors/403.http b/reg-tests/http-errorfiles/errors/403.http index fd969b200fe5..a32856d9bbfe 100644 --- a/reg-tests/http-errorfiles/errors/403.http +++ b/reg-tests/http-errorfiles/errors/403.http @@ -1,9 +1,9 @@ -HTTP/1.0 403 Forbidden -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: default - +HTTP/1.0 403 Forbidden +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: default +

403 Forbidden

Request forbidden by administrative rules. diff --git a/reg-tests/http-errorfiles/errors/404-1.http b/reg-tests/http-errorfiles/errors/404-1.http index 154ed0be7c5e..d7c92cd1fc38 100644 --- a/reg-tests/http-errorfiles/errors/404-1.http +++ b/reg-tests/http-errorfiles/errors/404-1.http @@ -1,9 +1,9 @@ -HTTP/1.1 404 Not Found -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-1 - +HTTP/1.1 404 Not Found +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-1 +

404 Not Found

The resource could not be found. diff --git a/reg-tests/http-errorfiles/errors/404-2.http b/reg-tests/http-errorfiles/errors/404-2.http index e26f91dc0b6f..996bcac7dfd9 100644 --- a/reg-tests/http-errorfiles/errors/404-2.http +++ b/reg-tests/http-errorfiles/errors/404-2.http @@ -1,9 +1,9 @@ -HTTP/1.1 404 Not Found -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-2 - +HTTP/1.1 404 Not Found +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-2 +

404 Not Found

The resource could not be found. diff --git a/reg-tests/http-errorfiles/errors/404-3.http b/reg-tests/http-errorfiles/errors/404-3.http index 4bc166106cdb..18f6acfe5a38 100644 --- a/reg-tests/http-errorfiles/errors/404-3.http +++ b/reg-tests/http-errorfiles/errors/404-3.http @@ -1,9 +1,9 @@ -HTTP/1.1 404 Not Found -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-3 - +HTTP/1.1 404 Not Found +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-3 +

404 Not Found

The resource could not be found. diff --git a/reg-tests/http-errorfiles/errors/404.http b/reg-tests/http-errorfiles/errors/404.http index 8dacd953d977..f0affb314ddc 100644 --- a/reg-tests/http-errorfiles/errors/404.http +++ b/reg-tests/http-errorfiles/errors/404.http @@ -1,9 +1,9 @@ -HTTP/1.1 404 Not Found -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: default - +HTTP/1.1 404 Not Found +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: default +

404 Not Found

The resource could not be found. diff --git a/reg-tests/http-errorfiles/errors/500-1.http b/reg-tests/http-errorfiles/errors/500-1.http index 4e4f7e428352..d66fa270db1a 100644 --- a/reg-tests/http-errorfiles/errors/500-1.http +++ b/reg-tests/http-errorfiles/errors/500-1.http @@ -1,9 +1,9 @@ -HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: errors-1 - +HTTP/1.0 500 Internal Server Error +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: errors-1 +

500 Internal Server Error

An internal server error occurred. diff --git a/reg-tests/http-errorfiles/errors/500.http b/reg-tests/http-errorfiles/errors/500.http index 68a31ff44db3..1eb30b958d17 100644 --- a/reg-tests/http-errorfiles/errors/500.http +++ b/reg-tests/http-errorfiles/errors/500.http @@ -1,9 +1,9 @@ -HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache -Connection: close -Content-Type: text/html -x-err-type: default - +HTTP/1.0 500 Internal Server Error +Cache-Control: no-cache +Connection: close +Content-Type: text/html +x-err-type: default +

500 Internal Server Error

An internal server error occurred. From 573e70cd5581e5167a4b79307d13cb62fa11e6cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Jan 2026 22:16:28 +0000 Subject: [PATCH 4/4] Remove cache-control headers from error responses Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com> --- examples/errorfiles/400.http | 1 - examples/errorfiles/403.http | 1 - examples/errorfiles/408.http | 1 - examples/errorfiles/500.http | 1 - examples/errorfiles/502.http | 1 - examples/errorfiles/503.http | 1 - examples/errorfiles/504.http | 1 - reg-tests/http-errorfiles/errors/400-1.http | 1 - reg-tests/http-errorfiles/errors/400-2.http | 1 - reg-tests/http-errorfiles/errors/400-3.http | 1 - reg-tests/http-errorfiles/errors/400.http | 1 - reg-tests/http-errorfiles/errors/403-1.http | 1 - reg-tests/http-errorfiles/errors/403-2.http | 1 - reg-tests/http-errorfiles/errors/403.http | 1 - reg-tests/http-errorfiles/errors/404-1.http | 1 - reg-tests/http-errorfiles/errors/404-2.http | 1 - reg-tests/http-errorfiles/errors/404-3.http | 1 - reg-tests/http-errorfiles/errors/404.http | 1 - reg-tests/http-errorfiles/errors/500-1.http | 1 - reg-tests/http-errorfiles/errors/500.http | 1 - src/http.c | 20 -------------------- 21 files changed, 40 deletions(-) diff --git a/examples/errorfiles/400.http b/examples/errorfiles/400.http index d6c88501a827..6785e9dc97d5 100644 --- a/examples/errorfiles/400.http +++ b/examples/errorfiles/400.http @@ -1,5 +1,4 @@ HTTP/1.0 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/403.http b/examples/errorfiles/403.http index 21fbfa4e5f7f..531211743cf5 100644 --- a/examples/errorfiles/403.http +++ b/examples/errorfiles/403.http @@ -1,5 +1,4 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/408.http b/examples/errorfiles/408.http index 844f6006a980..bb5a8d4b941a 100644 --- a/examples/errorfiles/408.http +++ b/examples/errorfiles/408.http @@ -1,5 +1,4 @@ HTTP/1.0 408 Request Time-out -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/500.http b/examples/errorfiles/500.http index 3e60a6658bb4..224792e8fa61 100644 --- a/examples/errorfiles/500.http +++ b/examples/errorfiles/500.http @@ -1,5 +1,4 @@ HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/502.http b/examples/errorfiles/502.http index 5712d12e05ce..0b3d72d207f1 100644 --- a/examples/errorfiles/502.http +++ b/examples/errorfiles/502.http @@ -1,5 +1,4 @@ HTTP/1.0 502 Bad Gateway -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/503.http b/examples/errorfiles/503.http index 367d4254fa5e..049e67d69500 100644 --- a/examples/errorfiles/503.http +++ b/examples/errorfiles/503.http @@ -1,5 +1,4 @@ HTTP/1.0 503 Service Unavailable -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/examples/errorfiles/504.http b/examples/errorfiles/504.http index a788ce5f2efd..d4ed049a4cde 100644 --- a/examples/errorfiles/504.http +++ b/examples/errorfiles/504.http @@ -1,5 +1,4 @@ HTTP/1.0 504 Gateway Time-out -Cache-Control: no-cache Connection: close Content-Type: text/html diff --git a/reg-tests/http-errorfiles/errors/400-1.http b/reg-tests/http-errorfiles/errors/400-1.http index 71ebd145ef04..e69f26f586d4 100644 --- a/reg-tests/http-errorfiles/errors/400-1.http +++ b/reg-tests/http-errorfiles/errors/400-1.http @@ -1,5 +1,4 @@ HTTP/1.1 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-1 diff --git a/reg-tests/http-errorfiles/errors/400-2.http b/reg-tests/http-errorfiles/errors/400-2.http index 9132a92ca94c..8c9ee9418590 100644 --- a/reg-tests/http-errorfiles/errors/400-2.http +++ b/reg-tests/http-errorfiles/errors/400-2.http @@ -1,5 +1,4 @@ HTTP/1.1 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-2 diff --git a/reg-tests/http-errorfiles/errors/400-3.http b/reg-tests/http-errorfiles/errors/400-3.http index 7565d0c03bfd..51b09e53545c 100644 --- a/reg-tests/http-errorfiles/errors/400-3.http +++ b/reg-tests/http-errorfiles/errors/400-3.http @@ -1,5 +1,4 @@ HTTP/1.1 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-3 diff --git a/reg-tests/http-errorfiles/errors/400.http b/reg-tests/http-errorfiles/errors/400.http index 6913ec9cd1fc..3883fd12251f 100644 --- a/reg-tests/http-errorfiles/errors/400.http +++ b/reg-tests/http-errorfiles/errors/400.http @@ -1,5 +1,4 @@ HTTP/1.1 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default diff --git a/reg-tests/http-errorfiles/errors/403-1.http b/reg-tests/http-errorfiles/errors/403-1.http index 480292b41877..f5419ae089f3 100644 --- a/reg-tests/http-errorfiles/errors/403-1.http +++ b/reg-tests/http-errorfiles/errors/403-1.http @@ -1,5 +1,4 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-1 diff --git a/reg-tests/http-errorfiles/errors/403-2.http b/reg-tests/http-errorfiles/errors/403-2.http index 438ece3a757c..956f0ee60199 100644 --- a/reg-tests/http-errorfiles/errors/403-2.http +++ b/reg-tests/http-errorfiles/errors/403-2.http @@ -1,5 +1,4 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-2 diff --git a/reg-tests/http-errorfiles/errors/403.http b/reg-tests/http-errorfiles/errors/403.http index a32856d9bbfe..12f5e342e283 100644 --- a/reg-tests/http-errorfiles/errors/403.http +++ b/reg-tests/http-errorfiles/errors/403.http @@ -1,5 +1,4 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default diff --git a/reg-tests/http-errorfiles/errors/404-1.http b/reg-tests/http-errorfiles/errors/404-1.http index d7c92cd1fc38..96e692c56b93 100644 --- a/reg-tests/http-errorfiles/errors/404-1.http +++ b/reg-tests/http-errorfiles/errors/404-1.http @@ -1,5 +1,4 @@ HTTP/1.1 404 Not Found -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-1 diff --git a/reg-tests/http-errorfiles/errors/404-2.http b/reg-tests/http-errorfiles/errors/404-2.http index 996bcac7dfd9..85b7da23ada6 100644 --- a/reg-tests/http-errorfiles/errors/404-2.http +++ b/reg-tests/http-errorfiles/errors/404-2.http @@ -1,5 +1,4 @@ HTTP/1.1 404 Not Found -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-2 diff --git a/reg-tests/http-errorfiles/errors/404-3.http b/reg-tests/http-errorfiles/errors/404-3.http index 18f6acfe5a38..79fce19220de 100644 --- a/reg-tests/http-errorfiles/errors/404-3.http +++ b/reg-tests/http-errorfiles/errors/404-3.http @@ -1,5 +1,4 @@ HTTP/1.1 404 Not Found -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-3 diff --git a/reg-tests/http-errorfiles/errors/404.http b/reg-tests/http-errorfiles/errors/404.http index f0affb314ddc..5272a38fa81f 100644 --- a/reg-tests/http-errorfiles/errors/404.http +++ b/reg-tests/http-errorfiles/errors/404.http @@ -1,5 +1,4 @@ HTTP/1.1 404 Not Found -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default diff --git a/reg-tests/http-errorfiles/errors/500-1.http b/reg-tests/http-errorfiles/errors/500-1.http index d66fa270db1a..411e358c4131 100644 --- a/reg-tests/http-errorfiles/errors/500-1.http +++ b/reg-tests/http-errorfiles/errors/500-1.http @@ -1,5 +1,4 @@ HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: errors-1 diff --git a/reg-tests/http-errorfiles/errors/500.http b/reg-tests/http-errorfiles/errors/500.http index 1eb30b958d17..b51376e25ac4 100644 --- a/reg-tests/http-errorfiles/errors/500.http +++ b/reg-tests/http-errorfiles/errors/500.http @@ -1,5 +1,4 @@ HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default diff --git a/src/http.c b/src/http.c index b58185a26a43..7b536de73ca4 100644 --- a/src/http.c +++ b/src/http.c @@ -192,7 +192,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_400] = "HTTP/1.1 400 Bad request\r\n" "Content-length: 90\r\n" - "Cache-Control: no-cache\r\n" "Connection: close\r\n" "Content-Type: text/html\r\n" "\r\n" @@ -201,7 +200,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_401] = "HTTP/1.1 401 Unauthorized\r\n" "Content-length: 112\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

401 Unauthorized

\nYou need a valid user and password to access this content.\n\n", @@ -209,7 +207,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_403] = "HTTP/1.1 403 Forbidden\r\n" "Content-length: 93\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

403 Forbidden

\nRequest forbidden by administrative rules.\n\n", @@ -217,7 +214,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_404] = "HTTP/1.1 404 Not Found\r\n" "Content-length: 83\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

404 Not Found

\nThe resource could not be found.\n\n", @@ -225,7 +221,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_405] = "HTTP/1.1 405 Method Not Allowed\r\n" "Content-length: 147\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

405 Method Not Allowed

\nA request was made of a resource using a request method not supported by that resource.\n\n", @@ -233,7 +228,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_407] = "HTTP/1.1 407 Unauthorized\r\n" "Content-length: 112\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

407 Unauthorized

\nYou need a valid user and password to access this content.\n\n", @@ -241,7 +235,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_408] = "HTTP/1.1 408 Request Time-out\r\n" "Content-length: 110\r\n" - "Cache-Control: no-cache\r\n" "Connection: close\r\n" "Content-Type: text/html\r\n" "\r\n" @@ -250,7 +243,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_410] = "HTTP/1.1 410 Gone\r\n" "Content-length: 114\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

410 Gone

\nThe resource is no longer available and will not be available again.\n\n", @@ -258,7 +250,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_413] = "HTTP/1.1 413 Payload Too Large\r\n" "Content-length: 106\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

413 Payload Too Large

\nThe request entity exceeds the maximum allowed.\n\n", @@ -266,7 +257,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_414] = "HTTP/1.1 414 URI Too Long\r\n" "Content-length: 110\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

414 URI Too Long

\nThe URI provided was too long for the server to process.\n\n", @@ -274,7 +264,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_421] = "HTTP/1.1 421 Misdirected Request\r\n" "Content-length: 104\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

421 Misdirected Request

\nRequest sent to a non-authoritative server.\n\n", @@ -282,7 +271,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_422] = "HTTP/1.1 422 Unprocessable Content\r\n" "Content-length: 116\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

422 Unprocessable Content

\nThe server cannot process the contained instructions.\n\n", @@ -290,7 +278,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_425] = "HTTP/1.1 425 Too Early\r\n" "Content-length: 80\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

425 Too Early

\nYour browser sent early data.\n\n", @@ -298,7 +285,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_429] = "HTTP/1.1 429 Too Many Requests\r\n" "Content-length: 117\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

429 Too Many Requests

\nYou have sent too many requests in a given amount of time.\n\n", @@ -306,7 +292,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_431] = "HTTP/1.1 431 Request Header Fields Too Large\r\n" "Content-length: 105\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

431 Request Header Fields Too Large

\nRequest Header Fields Too Large.\n\n", @@ -314,7 +299,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_500] = "HTTP/1.1 500 Internal Server Error\r\n" "Content-length: 97\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

500 Internal Server Error

\nAn internal server error occurred.\n\n", @@ -322,7 +306,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_501] = "HTTP/1.1 501 Not Implemented\r\n" "Content-length: 135\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

501 Not Implemented

\nThe server does not support the functionality required to fulfill the request.\n\n", @@ -330,7 +313,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_502] = "HTTP/1.1 502 Bad Gateway\r\n" "Content-length: 107\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

502 Bad Gateway

\nThe server returned an invalid or incomplete response.\n\n", @@ -338,7 +320,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_503] = "HTTP/1.1 503 Service Unavailable\r\n" "Content-length: 107\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

503 Service Unavailable

\nNo server is available to handle this request.\n\n", @@ -346,7 +327,6 @@ const char *http_err_msgs[HTTP_ERR_SIZE] = { [HTTP_ERR_504] = "HTTP/1.1 504 Gateway Time-out\r\n" "Content-length: 92\r\n" - "Cache-Control: no-cache\r\n" "Content-Type: text/html\r\n" "\r\n" "

504 Gateway Time-out

\nThe server didn't respond in time.\n\n",