projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f336b2
)
In chat(), do not bother to generate a client request in case of direct CONNECT requests
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 23 Oct 2011 11:18:53 +0000
(11:18 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 23 Oct 2011 11:18:53 +0000
(11:18 +0000)
jcc.c
patch
|
blob
|
history
diff --git
a/jcc.c
b/jcc.c
index
0345caf
..
636ebc0
100644
(file)
--- a/
jcc.c
+++ b/
jcc.c
@@
-1,4
+1,4
@@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.36
6 2011/10/08 17:30:21
fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.36
7 2011/10/16 12:40:34
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@
-1693,16
+1693,16
@@
static void chat(struct client_state *csp)
}
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
}
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
- hdr = list_to_text(csp->headers);
- if (hdr == NULL)
- {
- /* FIXME Should handle error properly */
- log_error(LOG_LEVEL_FATAL, "Out of memory parsing client header");
- }
- list_remove_all(csp->headers);
-
if (fwd->forward_host || (http->ssl == 0))
{
if (fwd->forward_host || (http->ssl == 0))
{
+ hdr = list_to_text(csp->headers);
+ if (hdr == NULL)
+ {
+ /* FIXME Should handle error properly */
+ log_error(LOG_LEVEL_FATAL, "Out of memory parsing client header");
+ }
+ list_remove_all(csp->headers);
+
/*
* Write the client's (modified) header to the server
* (along with anything else that may be in the buffer)
/*
* Write the client's (modified) header to the server
* (along with anything else that may be in the buffer)
@@
-1722,17
+1722,18
@@
static void chat(struct client_state *csp)
freez(hdr);
return;
}
freez(hdr);
return;
}
+ freez(hdr);
}
else
{
/*
* We're running an SSL tunnel and we're not forwarding,
}
else
{
/*
* We're running an SSL tunnel and we're not forwarding,
- * so just
send the "connect succeeded" message to the
- * client, flush the rest, and get out of the way.
+ * so just
ditch the client headers, send the "connect succeeded"
+ *
message to the
client, flush the rest, and get out of the way.
*/
*/
+ list_remove_all(csp->headers);
if (write_socket(csp->cfd, CSUCCEED, strlen(CSUCCEED)))
{
if (write_socket(csp->cfd, CSUCCEED, strlen(CSUCCEED)))
{
- freez(hdr);
return;
}
IOB_RESET(csp);
return;
}
IOB_RESET(csp);
@@
-1742,9
+1743,6
@@
static void chat(struct client_state *csp)
csp->server_connection.request_sent = time(NULL);
csp->server_connection.request_sent = time(NULL);
- /* we're finished with the client's header */
- freez(hdr);
-
maxfd = (csp->cfd > csp->server_connection.sfd) ?
csp->cfd : csp->server_connection.sfd;
maxfd = (csp->cfd > csp->server_connection.sfd) ?
csp->cfd : csp->server_connection.sfd;