Index: squid/src/structs.h diff -c squid/src/structs.h:1.408.2.12 squid/src/structs.h:1.408.2.13 *** squid/src/structs.h:1.408.2.12 Tue Jul 1 14:42:42 2003 --- squid/src/structs.h Wed Aug 6 07:49:03 2003 *************** *** 1492,1498 **** struct timeval start_ping; IRCB *ping_reply_callback; void *ircb_data; - int fd; /* FD of client creating this entry */ struct { STABH *callback; void *data; --- 1492,1497 ---- Index: squid/src/http.c diff -c squid/src/http.c:1.384.2.7 squid/src/http.c:1.384.2.8 *** squid/src/http.c:1.384.2.7 Tue Jul 15 14:16:12 2003 --- squid/src/http.c Wed Aug 6 07:49:01 2003 *************** *** 721,727 **** request_t * orig_request, StoreEntry * entry, HttpHeader * hdr_out, - int cfd, http_state_flags flags) { /* building buffer for complex strings */ --- 721,726 ---- *************** *** 856,862 **** /* append X-Forwarded-For */ strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR); ! strListAdd(&strFwd, (cfd < 0 ? "unknown" : fd_table[cfd].ipaddr), ','); httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd)); stringClean(&strFwd); --- 855,863 ---- /* append X-Forwarded-For */ strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR); ! strListAdd(&strFwd, ! (orig_request->client_addr.s_addr != no_addr.s_addr ? ! inet_ntoa(orig_request->client_addr) : "unknown"), ','); httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd)); stringClean(&strFwd); *************** *** 935,941 **** request_t * orig_request, StoreEntry * entry, MemBuf * mb, - int cfd, http_state_flags flags) { const int offset = mb->size; --- 936,941 ---- *************** *** 946,952 **** { HttpHeader hdr; Packer p; ! httpBuildRequestHeader(request, orig_request, entry, &hdr, cfd, flags); packerToMemInit(&p, mb); httpHeaderPackInto(&hdr, &p); httpHeaderClean(&hdr); --- 946,952 ---- { HttpHeader hdr; Packer p; ! httpBuildRequestHeader(request, orig_request, entry, &hdr, flags); packerToMemInit(&p, mb); httpHeaderPackInto(&hdr, &p); httpHeaderClean(&hdr); *************** *** 963,969 **** MemBuf mb; request_t *req = httpState->request; StoreEntry *entry = httpState->entry; - int cfd; peer *p = httpState->peer; CWCB *sendHeaderDone; --- 963,968 ---- *************** *** 974,986 **** else sendHeaderDone = httpSendComplete; - if (!opt_forwarded_for) - cfd = -1; - else if (entry->mem_obj == NULL) - cfd = -1; - else - cfd = entry->mem_obj->fd; - assert(-1 == cfd || FD_SOCKET == fd_table[cfd].type); if (p != NULL) httpState->flags.proxying = 1; else --- 973,978 ---- *************** *** 1005,1011 **** httpState->orig_request, entry, &mb, - cfd, httpState->flags); debug(11, 6) ("httpSendRequest: FD %d:\n%s\n", httpState->fd, mb.buf); comm_write_mbuf(httpState->fd, mb, sendHeaderDone, httpState); --- 997,1002 ---- Index: squid/src/store_client.c diff -c squid/src/store_client.c:1.105.2.1 squid/src/store_client.c:1.105.2.2 *** squid/src/store_client.c:1.105.2.1 Wed Jan 22 18:57:02 2003 --- squid/src/store_client.c Wed Aug 6 07:49:03 2003 *************** *** 511,523 **** return 0; if (mem->clients.head == NULL) return 0; - if (sc == mem->clients.head->data) { - /* - * If we are unregistering the _first_ client for this - * entry, then we have to reset the client FD to -1. - */ - mem->fd = -1; - } dlinkDelete(&sc->node, &mem->clients); mem->nclients--; if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE) --- 511,516 ---- Index: squid/src/store.c diff -c squid/src/store.c:1.544.2.3 squid/src/store.c:1.544.2.4 *** squid/src/store.c:1.544.2.3 Mon Jun 23 10:50:56 2003 --- squid/src/store.c Wed Aug 6 07:49:02 2003 *************** *** 121,127 **** #endif mem->log_url = xstrdup(log_url); mem->object_sz = -1; - mem->fd = -1; /* XXX account log_url */ debug(20, 3) ("new_MemObject: returning %p\n", mem); return mem; --- 121,126 ---- *************** *** 155,165 **** assert(mem->swapout.sio == NULL); stmemFree(&mem->data_hdr); mem->inmem_hi = 0; /* * There is no way to abort FD-less clients, so they might ! * still have mem->clients set if mem->fd == -1 */ ! assert(mem->fd == -1 || mem->clients.head == NULL); httpReplyDestroy(mem->reply); requestUnlink(mem->request); mem->request = NULL; --- 154,166 ---- assert(mem->swapout.sio == NULL); stmemFree(&mem->data_hdr); mem->inmem_hi = 0; + #if 0 /* * There is no way to abort FD-less clients, so they might ! * still have mem->clients set. */ ! assert(mem->clients.head == NULL); ! #endif httpReplyDestroy(mem->reply); requestUnlink(mem->request); mem->request = NULL; Index: squid/src/protos.h diff -c squid/src/protos.h:1.420.2.18 squid/src/protos.h:1.420.2.19 *** squid/src/protos.h:1.420.2.18 Tue May 6 14:13:02 2003 --- squid/src/protos.h Wed Aug 6 07:49:02 2003 *************** *** 309,320 **** request_t * orig_request, StoreEntry * entry, MemBuf * mb, - int cfd, http_state_flags); extern void httpAnonInitModule(void); extern int httpAnonHdrAllowed(http_hdr_type hdr_id); extern int httpAnonHdrDenied(http_hdr_type hdr_id); ! extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, http_state_flags); extern void httpBuildVersion(http_version_t * version, unsigned int major, unsigned int minor); extern const char *httpMakeVaryMark(request_t * request, HttpReply * reply); --- 309,319 ---- request_t * orig_request, StoreEntry * entry, MemBuf * mb, http_state_flags); extern void httpAnonInitModule(void); extern int httpAnonHdrAllowed(http_hdr_type hdr_id); extern int httpAnonHdrDenied(http_hdr_type hdr_id); ! extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, http_state_flags); extern void httpBuildVersion(http_version_t * version, unsigned int major, unsigned int minor); extern const char *httpMakeVaryMark(request_t * request, HttpReply * reply); Index: squid/src/forward.c diff -c squid/src/forward.c:1.82.2.3 squid/src/forward.c:1.82.2.4 *** squid/src/forward.c:1.82.2.3 Mon Mar 17 11:34:19 2003 --- squid/src/forward.c Wed Aug 6 07:49:01 2003 *************** *** 612,618 **** } debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e)); e->mem_obj->request = requestLink(r); - e->mem_obj->fd = fd; #if URL_CHECKSUM_DEBUG assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url)); #endif --- 612,617 ---- Index: squid/src/htcp.c diff -c squid/src/htcp.c:1.38.2.3 squid/src/htcp.c:1.38.2.4 *** squid/src/htcp.c:1.38.2.3 Sun May 11 11:30:13 2003 --- squid/src/htcp.c Wed Aug 6 07:49:01 2003 *************** *** 919,925 **** stuff.S.method = (char *) RequestMethodStr[req->method]; stuff.S.uri = (char *) storeUrl(e); stuff.S.version = vbuf; ! httpBuildRequestHeader(req, req, e, &hdr, -1, flags); memBufDefInit(&mb); packerToMemInit(&pa, &mb); httpHeaderPackInto(&hdr, &pa); --- 919,925 ---- stuff.S.method = (char *) RequestMethodStr[req->method]; stuff.S.uri = (char *) storeUrl(e); stuff.S.version = vbuf; ! httpBuildRequestHeader(req, req, e, &hdr, flags); memBufDefInit(&mb); packerToMemInit(&pa, &mb); httpHeaderPackInto(&hdr, &pa); Index: squid/src/ssl.c diff -c squid/src/ssl.c:1.118.2.3 squid/src/ssl.c:1.118.2.4 *** squid/src/ssl.c:1.118.2.3 Sun Feb 9 14:42:03 2003 --- squid/src/ssl.c Wed Aug 6 07:49:02 2003 *************** *** 556,562 **** sslState->request, NULL, /* StoreEntry */ &hdr_out, - sslState->client.fd, flags); /* flags */ packerToMemInit(&p, &mb); httpHeaderPackInto(&hdr_out, &p); --- 556,561 ----

AltStyle によって変換されたページ (->オリジナル) /