Hi.
I have found the cause of this behavior to be a bit more complicated than
given in my last message. In fact, I am using a redirector, and it is only
in this case that the keep-alive was not getting maintained.
The problem, I think, is that a new request object is created when a
redirector changes the url and _most_ of the old request's fields are
copied to the new request. It looks like the proxy_keepalive flag is not
copied. I've added it to my code and the connections are now maintained.
Please let me know if I have miscalculated, thanks.
The one line I've added is below:
client_side.c (section lines 272-291):
if (new_request) {
safe_free(http->uri);
http->uri = xstrdup(urlCanonical(new_request));
new_request->http_ver = old_request->http_ver;
httpHeaderAppend(&new_request->header, &old_request->header);
new_request->client_addr = old_request->client_addr;
new_request->my_addr = old_request->my_addr;
new_request->my_port = old_request->my_port;
new_request->flags.redirected = 1;
if (old_request->user_ident[0])
xstrncpy(new_request->user_ident, old_request->user_ident,
USER_IDENT_SZ);
if (old_request->body) {
new_request->body = xmalloc(old_request->body_sz);
xmemcpy(new_request->body, old_request->body, old_request->body_sz);
new_request->body_sz = old_request->body_sz;
}
new_request->content_length = old_request->content_length;
!!!! new_request->flags.proxy_keepalive = old_request->flags.proxy_keepalive;
requestUnlink(old_request);
http->request = requestLink(new_request);
}
> the connection to squid should be maintained even if squid receives a
"Connection: close"
> from the origin server. However, I am noticing that the "Connection:
close" is causing
> squid to close the connection with my browser. Is this a bug? I have
applied the 2.3
> Stable 3 bug fixes.
Received on Wed Aug 02 2000 - 20:36:24 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:41 MST