TRACE working again

This commit is contained in:
2022-12-31 02:20:32 +01:00
parent e667a79ab2
commit 680344fbec
3 changed files with 3 additions and 5 deletions

View File

@ -214,7 +214,7 @@ int respond(client_ctx_t *ctx) {
if (http_get_header_field(&res->hdr, "Accept-Ranges") == NULL) {
http_add_header_field(&res->hdr, "Accept-Ranges", "none");
}
if (!ctx->use_fastcgi && ctx->file == NULL) {
if (!ctx->use_fastcgi && ctx->file == NULL && ctx->msg_buf[0] == 0) {
http_remove_header_field(&res->hdr, "Date", HTTP_REMOVE_ALL);
http_remove_header_field(&res->hdr, "Server", HTTP_REMOVE_ALL);
http_remove_header_field(&res->hdr, "Cache-Control", HTTP_REMOVE_ALL);