diff --git a/src/worker/fastcgi_handler.c b/src/worker/fastcgi_handler.c index b530804..6af729e 100644 --- a/src/worker/fastcgi_handler.c +++ b/src/worker/fastcgi_handler.c @@ -19,10 +19,9 @@ static int fastcgi_handler_1(client_ctx_t *ctx, fastcgi_cnx_t *fcgi_cnx); static int fastcgi_handler_2(client_ctx_t *ctx, fastcgi_cnx_t *fcgi_cnx); void fastcgi_handler_func(client_ctx_t *ctx) { - fastcgi_cnx_t fcgi_cnx; - logger_set_prefix("[%s%*s%s]%s", BLD_STR, INET6_ADDRSTRLEN, ctx->req_host, CLR_STR, ctx->log_prefix); - // TODO + + fastcgi_cnx_t fcgi_cnx; fastcgi_handler_1(ctx, &fcgi_cnx); respond(ctx); fastcgi_handler_2(ctx, &fcgi_cnx); diff --git a/src/worker/local_handler.c b/src/worker/local_handler.c index 13ef1c8..8c5fe53 100644 --- a/src/worker/local_handler.c +++ b/src/worker/local_handler.c @@ -44,7 +44,6 @@ static int local_handler(client_ctx_t *ctx) { int accept_if_modified_since = 0; if (strcmp(req->method, "TRACE") == 0) { - // FIXME not working? res->status = http_get_status(200); http_add_header_field(&res->hdr, "Content-Type", "message/http"); diff --git a/src/worker/request_handler.c b/src/worker/request_handler.c index 592b5a7..080b5f4 100644 --- a/src/worker/request_handler.c +++ b/src/worker/request_handler.c @@ -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);