TRACE working again
This commit is contained in:
@ -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);
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user