projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set the SERVER_CONTENT_LENGTH_SET flag after creating a new Content-Length header
[privoxy.git]
/
jcc.c
diff --git
a/jcc.c
b/jcc.c
index
24ddae7
..
7d3b723
100644
(file)
--- a/
jcc.c
+++ b/
jcc.c
@@
-1,4
+1,4
@@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.41
3 2012/11/09 10:48:17
fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.41
6 2012/11/24 14:01:25
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@
-951,6
+951,7
@@
static int server_response_is_complete(struct client_state *csp,
*/
csp->expected_content_length = 0;
content_length_known = TRUE;
*/
csp->expected_content_length = 0;
content_length_known = TRUE;
+ csp->flags |= CSP_FLAG_SERVER_CONTENT_LENGTH_SET;
}
if (csp->http->status == 204 || csp->http->status == 304)
}
if (csp->http->status == 204 || csp->http->status == 304)
@@
-960,6
+961,7
@@
static int server_response_is_complete(struct client_state *csp,
*/
csp->expected_content_length = 0;
content_length_known = TRUE;
*/
csp->expected_content_length = 0;
content_length_known = TRUE;
+ csp->flags |= CSP_FLAG_SERVER_CONTENT_LENGTH_SET;
}
return (content_length_known && ((0 == csp->expected_content_length)
}
return (content_length_known && ((0 == csp->expected_content_length)
@@
-1118,9
+1120,7
@@
static void verify_request_length(struct client_state *csp)
{
/* XXX: this is an incomplete hack */
csp->flags &= ~CSP_FLAG_CLIENT_REQUEST_COMPLETELY_READ;
{
/* XXX: this is an incomplete hack */
csp->flags &= ~CSP_FLAG_CLIENT_REQUEST_COMPLETELY_READ;
- csp->flags |= CSP_FLAG_SERVER_SOCKET_TAINTED;
- log_error(LOG_LEVEL_CONNECT,
- "There might be a request body. The connection will not be kept alive.");
+ log_error(LOG_LEVEL_CONNECT, "There better be a request body.");
}
else
{
}
else
{
@@
-1181,7
+1181,7
@@
static void mark_server_socket_tainted(struct client_state *csp)
* actually been reused.
*/
if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE)
* actually been reused.
*/
if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE)
- && !(csp->flags
|=
CSP_FLAG_SERVER_SOCKET_TAINTED))
+ && !(csp->flags
&
CSP_FLAG_SERVER_SOCKET_TAINTED))
{
log_error(LOG_LEVEL_CONNECT,
"Marking the server socket %d tainted.",
{
log_error(LOG_LEVEL_CONNECT,
"Marking the server socket %d tainted.",