X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=parsers.c;h=27ada5f76c44b1263a97f0d42c7b47c0ce50caa2;hb=8719a1048c59e4a500b0c4c31fc133a038de4c0c;hp=4111996f4f91f7691cacaae68e6604d7361b0f06;hpb=78a7aba27bc91ae8e9122f617dd47bd49399a844;p=privoxy.git diff --git a/parsers.c b/parsers.c index 4111996f..27ada5f7 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.294 2014/10/18 11:30:04 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.296 2014/11/03 14:41:12 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -1662,6 +1662,8 @@ static jb_err server_keep_alive(struct client_state *csp, char **header) csp->flags |= CSP_FLAG_SERVER_KEEP_ALIVE_TIMEOUT_SET; } + freez(*header); + return JB_ERR_OK; } @@ -3878,7 +3880,7 @@ static jb_err server_http(struct client_state *csp, char **header) reason_phrase=""; } - if (3 != sscanf(*header, "HTTP/%u.%u %u", &major_version, + if (3 != sscanf(*header, "HTTP/%u.%u %d", &major_version, &minor_version, &(csp->http->status))) { log_error(LOG_LEVEL_ERROR, @@ -3913,7 +3915,7 @@ static jb_err server_http(struct client_state *csp, char **header) length = sizeof("HTTP/1.1 200 ") + strlen(reason_phrase) + 1; new_response_line = malloc_or_die(length); - snprintf(new_response_line, length, "HTTP/%u.%u %u %s", + snprintf(new_response_line, length, "HTTP/%u.%u %d %s", major_version, minor_version, csp->http->status, reason_phrase); if (0 != strcmp(*header, new_response_line))