From: "copilot-swe-agent[bot]" <[email protected]>
Co-authored-by: chipitsine <[email protected]> --- examples/errorfiles/400.http | 7 +++---- examples/errorfiles/403.http | 7 +++---- examples/errorfiles/408.http | 7 +++---- examples/errorfiles/500.http | 7 +++---- examples/errorfiles/502.http | 7 +++---- examples/errorfiles/503.http | 7 +++---- examples/errorfiles/504.http | 7 +++---- 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 | 7 +++---- 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 | 7 +++---- reg-tests/http-errorfiles/errors/500-1.http | 1 - reg-tests/http-errorfiles/errors/500.http | 7 +++---- src/http.c | 15 --------------- 17 files changed, 30 insertions(+), 61 deletions(-) diff --git a/examples/errorfiles/400.http b/examples/errorfiles/400.http index e223e38d9..f8a4f68c6 100644 --- a/examples/errorfiles/400.http +++ b/examples/errorfiles/400.http @@ -1,9 +1,8 @@ HTTP/1.0 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>400 Bad request</h1> -Your browser sent an invalid request. -</body></html> +<html><body><h1>400 Bad request</h1> +Your browser sent an invalid request. +</body></html> diff --git a/examples/errorfiles/403.http b/examples/errorfiles/403.http index a67e80755..39da4a5e7 100644 --- a/examples/errorfiles/403.http +++ b/examples/errorfiles/403.http @@ -1,9 +1,8 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>403 Forbidden</h1> -Request forbidden by administrative rules. -</body></html> +<html><body><h1>403 Forbidden</h1> +Request forbidden by administrative rules. +</body></html> diff --git a/examples/errorfiles/408.http b/examples/errorfiles/408.http index aafb1300f..7501222c4 100644 --- a/examples/errorfiles/408.http +++ b/examples/errorfiles/408.http @@ -1,9 +1,8 @@ HTTP/1.0 408 Request Time-out -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>408 Request Time-out</h1> -Your browser didn't send a complete request in time. -</body></html> +<html><body><h1>408 Request Time-out</h1> +Your browser didn't send a complete request in time. +</body></html> diff --git a/examples/errorfiles/500.http b/examples/errorfiles/500.http index 9c3be965c..dbb9d9a17 100644 --- a/examples/errorfiles/500.http +++ b/examples/errorfiles/500.http @@ -1,9 +1,8 @@ HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>500 Internal Server Error</h1> -An internal server error occurred. -</body></html> +<html><body><h1>500 Internal Server Error</h1> +An internal server error occurred. +</body></html> diff --git a/examples/errorfiles/502.http b/examples/errorfiles/502.http index 94b35d492..4fe7f27fb 100644 --- a/examples/errorfiles/502.http +++ b/examples/errorfiles/502.http @@ -1,9 +1,8 @@ HTTP/1.0 502 Bad Gateway -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>502 Bad Gateway</h1> -The server returned an invalid or incomplete response. -</body></html> +<html><body><h1>502 Bad Gateway</h1> +The server returned an invalid or incomplete response. +</body></html> diff --git a/examples/errorfiles/503.http b/examples/errorfiles/503.http index 48fde5881..6d38c2ab6 100644 --- a/examples/errorfiles/503.http +++ b/examples/errorfiles/503.http @@ -1,9 +1,8 @@ HTTP/1.0 503 Service Unavailable -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>503 Service Unavailable</h1> -No server is available to handle this request. -</body></html> +<html><body><h1>503 Service Unavailable</h1> +No server is available to handle this request. +</body></html> diff --git a/examples/errorfiles/504.http b/examples/errorfiles/504.http index f92518414..be796c3b2 100644 --- a/examples/errorfiles/504.http +++ b/examples/errorfiles/504.http @@ -1,9 +1,8 @@ HTTP/1.0 504 Gateway Time-out -Cache-Control: no-cache Connection: close Content-Type: text/html -<html><body><h1>504 Gateway Time-out</h1> -The server didn't respond in time. -</body></html> +<html><body><h1>504 Gateway Time-out</h1> +The server didn't respond in time. +</body></html> diff --git a/reg-tests/http-errorfiles/errors/400-1.http b/reg-tests/http-errorfiles/errors/400-1.http index 86a2e693d..59a06c342 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 c10851036..09806e9c9 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 1fe18410b..f38656a36 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 ce229aa9f..ab81faa17 100644 --- a/reg-tests/http-errorfiles/errors/400.http +++ b/reg-tests/http-errorfiles/errors/400.http @@ -1,9 +1,8 @@ HTTP/1.1 400 Bad request -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default -<html><body><h1>400 Bad request</h1> -Your browser sent an invalid request. -</body></html> +<html><body><h1>400 Bad request</h1> +Your browser sent an invalid request. +</body></html> diff --git a/reg-tests/http-errorfiles/errors/403-1.http b/reg-tests/http-errorfiles/errors/403-1.http index 08bdf02af..49dcf0638 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 9c07e5dd0..da78b10f6 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 fd969b200..713cc3f8e 100644 --- a/reg-tests/http-errorfiles/errors/403.http +++ b/reg-tests/http-errorfiles/errors/403.http @@ -1,9 +1,8 @@ HTTP/1.0 403 Forbidden -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default -<html><body><h1>403 Forbidden</h1> -Request forbidden by administrative rules. -</body></html> +<html><body><h1>403 Forbidden</h1> +Request forbidden by administrative rules. +</body></html> diff --git a/reg-tests/http-errorfiles/errors/500-1.http b/reg-tests/http-errorfiles/errors/500-1.http index 4e4f7e428..daa0066ac 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 68a31ff44..cbccfdbca 100644 --- a/reg-tests/http-errorfiles/errors/500.http +++ b/reg-tests/http-errorfiles/errors/500.http @@ -1,9 +1,8 @@ HTTP/1.0 500 Internal Server Error -Cache-Control: no-cache Connection: close Content-Type: text/html x-err-type: default -<html><body><h1>500 Internal Server Error</h1> -An internal server error occurred. -</body></html> +<html><body><h1>500 Internal Server Error</h1> +An internal server error occurred. +</body></html> diff --git a/src/http.c b/src/http.c index b58185a26..85d5f504a 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" "<html><body><h1>401 Unauthorized</h1>\nYou need a valid user and password to access this content.\n</body></html>\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" "<html><body><h1>403 Forbidden</h1>\nRequest forbidden by administrative rules.\n</body></html>\n", @@ -233,7 +230,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" "<html><body><h1>407 Unauthorized</h1>\nYou need a valid user and password to access this content.\n</body></html>\n", @@ -241,7 +237,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" @@ -258,7 +253,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" "<html><body><h1>413 Payload Too Large</h1>\nThe request entity exceeds the maximum allowed.\n</body></html>\n", @@ -274,7 +268,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" "<html><body><h1>421 Misdirected Request</h1>\nRequest sent to a non-authoritative server.\n</body></html>\n", @@ -282,7 +275,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" "<html><body><h1>422 Unprocessable Content</h1>\nThe server cannot process the contained instructions.\n</body></html>\n", @@ -290,7 +282,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" "<html><body><h1>425 Too Early</h1>\nYour browser sent early data.\n</body></html>\n", @@ -298,7 +289,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" "<html><body><h1>429 Too Many Requests</h1>\nYou have sent too many requests in a given amount of time.\n</body></html>\n", @@ -306,7 +296,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" "<html><body><h1>431 Request Header Fields Too Large</h1>\nRequest Header Fields Too Large.\n</body></html>\n", @@ -314,7 +303,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" "<html><body><h1>500 Internal Server Error</h1>\nAn internal server error occurred.\n</body></html>\n", @@ -330,7 +318,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" "<html><body><h1>502 Bad Gateway</h1>\nThe server returned an invalid or incomplete response.\n</body></html>\n", @@ -338,7 +325,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" "<html><body><h1>503 Service Unavailable</h1>\nNo server is available to handle this request.\n</body></html>\n", @@ -346,7 +332,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" "<html><body><h1>504 Gateway Time-out</h1>\nThe server didn't respond in time.\n</body></html>\n", -- 2.46.0.windows.1

