--------------------- PatchSet 5108 Date: 2002/09/24 11:54:51 Author: rbcollins Branch: esi Tag: (none) Log: update to HEAD API changes Members: src/ESI.c:1.1.2.35->1.1.2.36 src/Makefile.am:1.23.2.7->1.23.2.8 src/clientStream.c:1.1.2.14->1.1.2.15 src/client_side.c:1.65.2.21->1.65.2.22 src/client_side_reply.c:1.1.2.25->1.1.2.26 src/client_side_request.c:1.1.2.17->1.1.2.18 src/http.c:1.21.2.8->1.21.2.9 src/protos.h:1.59.2.16->1.59.2.17 Index: squid/src/ESI.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/ESI.c,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -r1.1.2.35 -r1.1.2.36 --- squid/src/ESI.c 9 Sep 2002 13:07:56 -0000 1.1.2.35 +++ squid/src/ESI.c 24 Sep 2002 11:54:51 -0000 1.1.2.36 @@ -1,6 +1,6 @@ /* - * $Id: ESI.c,v 1.1.2.35 2002/09/09 13:07:56 rbcollins Exp $ + * $Id: ESI.c,v 1.1.2.36 2002/09/24 11:54:51 rbcollins Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -34,6 +34,9 @@ */ #include "squid.h" +#include "ESI.h" +#include "clientStream.h" +#include "client_side_request.h" #include "expat.h" /* quick reference on behaviour here. @@ -512,7 +515,7 @@ if (context->flags.passthrough) { /* passthru mode - read into supplied buffers */ next = this->node.next->data; - clientStreamRead (this, http, next->readoff, next->readlen, next->readbuf); + clientStreamRead (this, http, next->readBuffer); cbdataReferenceDone (context); return; } @@ -549,10 +552,11 @@ } if (context->flags.oktosend && context->flags.finished) { + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; assert (!context->outbound); /* We've finished processing, and there is no more data buffered */ debug (86,5)("Telling recipient EOF on READ\n"); - clientStreamCallback (this, http, NULL, NULL, 0); + clientStreamCallback (this, http, NULL, tempBuffer); cbdataReferenceDone (context); return; } @@ -566,9 +570,13 @@ context->incoming = context->buffered; } assert (context->incoming && context->incoming->len != HTTP_REQBUF_SZ); - - clientStreamRead (this, http, context->readpos, context->incoming->len - HTTP_REQBUF_SZ, - &context->incoming->buf[context->incoming->len]); + { + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; + tempBuffer.offset = context->readpos; + tempBuffer.length = context->incoming->len - HTTP_REQBUF_SZ; + tempBuffer.data = &context->incoming->buf[context->incoming->len]; + clientStreamRead (this, http, tempBuffer); + } cbdataReferenceDone (context); } @@ -649,14 +657,14 @@ next = this->node.next->data; cbdataReference (context); if (context->outbound) - len = next->readlen < (context->outbound->len - context->outbound_offset) ? - next->readlen : (context->outbound->len - context->outbound_offset); + len = next->readBuffer.length < (context->outbound->len - context->outbound_offset) ? + next->readBuffer.length : (context->outbound->len - context->outbound_offset); /* prevent corruption on range requests, even though we don't support them yet */ - assert (context->pos == next->readoff); + assert (context->pos == next->readBuffer.offset); /* We must send data or a reply */ assert (len != 0 || context->rep != NULL); if (len) { - xmemcpy (next->readbuf, &context->outbound->buf[context->outbound_offset], len); + xmemcpy (next->readBuffer.data, &context->outbound->buf[context->outbound_offset], len); if (len + context->outbound_offset == context->outbound->len) { esiSegment *temp = context->outbound->next; /* remove the used buffer */ @@ -681,7 +689,13 @@ context->rep = NULL; /* freed downstream */ if (rep && context->varState) esiVarBuildVary (context->varState, rep); - clientStreamCallback (this, http, rep, next->readbuf, len); + { + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; + tempBuffer.length = len; + tempBuffer.offset = context->pos - len; + tempBuffer.data = next->readBuffer.data; + clientStreamCallback (this, http, rep, tempBuffer); + } if (len == 0) len = -1; /* tell the caller we sent something */ cbdataReferenceDone (context); @@ -724,7 +738,7 @@ * There is context data or a reply structure */ void -esiProcessStream (clientStreamNode *this, clientHttpRequest *http, HttpReply *rep, const char *body_data, ssize_t body_size) +esiProcessStream (clientStreamNode *this, clientHttpRequest *http, HttpReply *rep, StoreIOBuffer recievedData) { esiContext *context; /* test preconditions */ @@ -751,7 +765,7 @@ */ if (context->flags.passthrough) { cbdataReferenceDone(context); - clientStreamCallback (this, http, rep, body_data, body_size); + clientStreamCallback (this, http, rep, recievedData); return; } debug (86, 3)("esiProcessStream: Processing this %p context %p\n",this, context); @@ -761,10 +775,11 @@ /* Can we generate any data ?*/ - if (body_data) { + if (recievedData.data) { /* Increase our buffer area with incoming data */ - assert (body_size <= HTTP_REQBUF_SZ); - debug (86,5)("esiProcessStream found %u bytes of body data at offset %ld\n", body_size, this->readoff); + assert (recievedData.length <= HTTP_REQBUF_SZ); + assert (this->readBuffer.offset == recievedData.offset); + debug (86,5)("esiProcessStream found %u bytes of body data at offset %ld\n", recievedData.length, recievedData.offset); /* secure the data for later use */ if (!context->incoming) { /* create a new buffer segment */ @@ -773,41 +788,41 @@ context->buffered = cbdataAlloc (esiSegment); context->incoming = context->buffered; } - if (body_data != &context->incoming->buf[context->incoming->len]) { + if (recievedData.data != &context->incoming->buf[context->incoming->len]) { /* We have to copy the data out because we didn't supply this buffer */ size_t space = HTTP_REQBUF_SZ - context->incoming->len; - size_t len = space < body_size ? space : body_size; - debug (86,5)("Copying data from %p to %p because our buffer was not used\n", body_data, + size_t len = space < recievedData.length ? space : recievedData.length; + debug (86,5)("Copying data from %p to %p because our buffer was not used\n", recievedData.data, &context->incoming->buf[context->incoming->len]); - xmemcpy (&context->incoming->buf[context->incoming->len], body_data, len); + xmemcpy (&context->incoming->buf[context->incoming->len], recievedData.data, len); context->incoming->len += len; if (context->incoming->len == HTTP_REQBUF_SZ) { /* append another buffer */ context->incoming->next = cbdataAlloc (esiSegment); context->incoming = context->incoming->next; } - if (len != body_size) { + if (len != recievedData.length) { /* capture the remnants */ - xmemcpy (context->incoming->buf, &body_data[len], body_size - len); - context->incoming->len = body_size - len; + xmemcpy (context->incoming->buf, &recievedData.data[len], recievedData.length - len); + context->incoming->len = recievedData.length - len; } /* and note where we are up to */ - context->readpos += body_size; + context->readpos += recievedData.length; } else { /* update our position counters, and if needed assign a new buffer */ - context->incoming->len += body_size; + context->incoming->len += recievedData.length; assert (context->incoming->len <= HTTP_REQBUF_SZ); if (context->incoming->len > HTTP_REQBUF_SZ * 3 / 4) { /* allocate a new buffer - to stop us asking for ridiculously small amounts */ context->incoming->next = cbdataAlloc (esiSegment); context->incoming = context->incoming->next; } - context->readpos += body_size; + context->readpos += recievedData.length; } } /* EOF / Read error / aborted entry */ - if (rep == NULL && body_data == NULL && body_size == 0 && !context->flags.finishedtemplate) { + if (rep == NULL && recievedData.data == NULL && recievedData.length == 0 && !context->flags.finishedtemplate) { /* TODO: get stream status to test the entry for aborts */ /* else flush the esi processor */ debug (86,5)("esiProcess: %p Finished reading upstream data\n", context); @@ -833,9 +848,12 @@ * FIXME: Don't try this if we have finished reading the template */ if (!context->flags.finishedtemplate) { + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; assert (context->incoming && context->incoming->len < HTTP_REQBUF_SZ); - clientStreamRead (this, http, context->readpos, HTTP_REQBUF_SZ - context->incoming->len, - &context->incoming->buf[context->incoming->len]); + tempBuffer.offset = context->readpos; + tempBuffer.length = HTTP_REQBUF_SZ - context->incoming->len; + tempBuffer.data = &context->incoming->buf[context->incoming->len]; + clientStreamRead (this, http, tempBuffer); cbdataReferenceDone (context); return; } @@ -1449,7 +1467,7 @@ * There are no more entries in the stream chain. */ void -esiBufferRecipient (clientStreamNode *node, clientHttpRequest *http, HttpReply *rep, const char *body_data, ssize_t body_size) +esiBufferRecipient (clientStreamNode *node, clientHttpRequest *http, HttpReply *rep, StoreIOBuffer recievedData) { esiStreamContext *esiStream; /* Test preconditions */ @@ -1467,10 +1485,11 @@ esiStream = cbdataReference (node->data); /* If segments become more flexible, ignore this */ - assert (body_size <= sizeof(esiStream->localbuffer.buf)); + assert (recievedData.length <= sizeof(esiStream->localbuffer.buf)); assert (!esiStream->finished); - debug (86,5) ("esiBufferRecipient rep %p body %p len %d\n", rep, body_data, body_size); + debug (86,5) ("esiBufferRecipient rep %p body %p len %d\n", rep, recievedData.data, recievedData.length); + assert (node->readBuffer.offset == recievedData.offset); /* trivial case */ if (http->out.offset != 0) { @@ -1496,25 +1515,25 @@ } } - if (body_data && body_size) { - http->out.offset += body_size; + if (recievedData.data && recievedData.length) { + http->out.offset += recievedData.length; - if (body_data >= esiStream->localbuffer.buf && - body_data < &esiStream->localbuffer.buf[sizeof(esiStream->localbuffer.buf)]) { + if (recievedData.data >= esiStream->localbuffer.buf && + recievedData.data < &esiStream->localbuffer.buf[sizeof(esiStream->localbuffer.buf)]) { /* original static buffer */ - if (body_data != esiStream->localbuffer.buf) { + if (recievedData.data != esiStream->localbuffer.buf) { /* But not the start of it */ - xmemmove (esiStream->localbuffer.buf, body_data, body_size); + xmemmove (esiStream->localbuffer.buf, recievedData.data, recievedData.length); } - esiStream->localbuffer.len = body_size; + esiStream->localbuffer.len = recievedData.length; } else { assert (esiStream->buffer != NULL); - esiStream->buffer->len = body_size; + esiStream->buffer->len = recievedData.length; } } /* EOF / Read error / aborted entry */ - if (rep == NULL && body_data == NULL && body_size == 0) { + if (rep == NULL && recievedData.data == NULL && recievedData.length == 0) { /* TODO: get stream status to test the entry for aborts */ debug (86,5)("Finished reading upstream data in subrequest\n"); assert (cbdataReferenceValid (esiStream->include)); @@ -1557,6 +1576,7 @@ httpRequestFree (http); return; case STREAM_NONE: { + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; if (!esiStream->buffer) { esiStream->buffer = &esiStream->localbuffer; } @@ -1565,12 +1585,12 @@ esiStream->buffer->next = cbdataAlloc (esiSegment); esiStream->buffer = esiStream->buffer->next; } - + tempBuffer.offset = http->out.offset; + tempBuffer.length = sizeof (esiStream->buffer->buf); + tempBuffer.data = esiStream->buffer->buf; /* now just read into 'buffer' */ clientStreamRead (node, - http, http->out.offset, - sizeof (esiStream->buffer->buf), - esiStream->buffer->buf); + http, tempBuffer); debug (86,5)("esiBufferRecipient: Requested more data for ESI subrequest\n"); } break; Index: squid/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Makefile.am,v retrieving revision 1.23.2.7 retrieving revision 1.23.2.8 diff -u -r1.23.2.7 -r1.23.2.8 --- squid/src/Makefile.am 24 Sep 2002 11:10:01 -0000 1.23.2.7 +++ squid/src/Makefile.am 24 Sep 2002 11:54:51 -0000 1.23.2.8 @@ -64,8 +64,6 @@ WIN32SOURCE = endif -AM_CFLAGS = -Werror -Wall - SUBDIRS = fs repl auth INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include Index: squid/src/clientStream.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/clientStream.c,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- squid/src/clientStream.c 24 Sep 2002 11:10:03 -0000 1.1.2.14 +++ squid/src/clientStream.c 24 Sep 2002 11:54:51 -0000 1.1.2.15 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.c,v 1.1.2.14 2002/09/24 11:10:03 rbcollins Exp $ + * $Id: clientStream.c,v 1.1.2.15 2002/09/24 11:54:51 rbcollins Exp $ * * DEBUG: section 87 Client-side Stream routines. * AUTHOR: Robert Collins @@ -188,7 +188,6 @@ clientStreamRead(clientStreamNode * this, clientHttpRequest * http, StoreIOBuffer readBuffer) { - assert(this && http && this->node.prev); /* place the parameters on the 'stack' */ clientStreamNode *prev; assert(this && http && this->node.prev); Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.65.2.21 retrieving revision 1.65.2.22 diff -u -r1.65.2.21 -r1.65.2.22 --- squid/src/client_side.c 24 Sep 2002 11:10:03 -0000 1.65.2.21 +++ squid/src/client_side.c 24 Sep 2002 11:54:51 -0000 1.65.2.22 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.65.2.21 2002/09/24 11:10:03 rbcollins Exp $ + * $Id: client_side.c,v 1.65.2.22 2002/09/24 11:54:51 rbcollins Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -171,6 +171,10 @@ static int connKeepReadingIncompleteRequest(ConnStateData * conn); static void connCancelIncompleteRequests(ConnStateData * conn); static ConnStateData *connStateCreate(struct sockaddr_in peer, struct sockaddr_in me, int fd); +static clientStreamNode * getClientReplyContext(clientSocketContext * context); +static int connAreAllContextsForThisConnection(ConnStateData * connState); +static void connFreeAllContexts(ConnStateData * connState); +static void clientPullData(clientSocketContext * context); clientStreamNode * getTail(clientSocketContext * context) Index: squid/src/client_side_reply.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client_side_reply.c,v retrieving revision 1.1.2.25 retrieving revision 1.1.2.26 diff -u -r1.1.2.25 -r1.1.2.26 --- squid/src/client_side_reply.c 24 Sep 2002 11:10:04 -0000 1.1.2.25 +++ squid/src/client_side_reply.c 24 Sep 2002 11:54:54 -0000 1.1.2.26 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.c,v 1.1.2.25 2002/09/24 11:10:04 rbcollins Exp $ + * $Id: client_side_reply.c,v 1.1.2.26 2002/09/24 11:54:54 rbcollins Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -36,6 +36,9 @@ #include "squid.h" #include "StoreClient.h" #include "clientStream.h" +#if ESI +#include "ESI.h" +#endif typedef struct _clientReplyContext { @@ -137,7 +140,7 @@ if (status == HTTP_NOT_IMPLEMENTED && context->http->request) /* prevent confusion over whether we default to persistent or not */ context->http->request->flags.proxy_keepalive = 0; - context->http->al.http.code = errstate->http_status; + context->http->al.http.code = errstate->httpStatus; context->http->entry = clientCreateStoreEntry(context, method, null_request_flags); @@ -374,7 +377,7 @@ debug(88, 3) ("clientHandleIMSReply: ABORTED '%s'\n", url); /* We have an existing entry, but failed to validate it */ /* Its okay to send the old one anyway */ - http->log_type = LOG_TCP_REFRESH_FAIL_HIT; + http->logType = LOG_TCP_REFRESH_FAIL_HIT; clientRemoveStoreReference(context, &context->sc, &entry); /* Get the old request back */ clientReplyContextRestoreState(context, http); @@ -391,7 +394,7 @@ ("clientHandleIMSReply: Reply is too large '%s', using old entry\n", url); /* use old entry, this repeats the code abovez */ - http->log_type = LOG_TCP_REFRESH_FAIL_HIT; + http->logType = LOG_TCP_REFRESH_FAIL_HIT; clientRemoveStoreReference(context, &context->sc, &entry); entry = http->entry = http->old_entry; /* Get the old request back */ @@ -415,7 +418,7 @@ clientStreamNode *next = context->http->client_stream.head->next->data; StoreIOBuffer tempresult = EMPTYIOBUFFER; oldentry = http->old_entry; - http->log_type = LOG_TCP_REFRESH_HIT; + http->logType = LOG_TCP_REFRESH_HIT; if (oldentry->mem_obj->request == NULL) { oldentry->mem_obj->request = requestLink(mem->request); unlink_request = 1; @@ -451,7 +454,7 @@ httpReplyUpdateOnNotModified(http->old_entry->mem_obj->reply, mem->reply); storeTimestampsSet(http->old_entry); - http->log_type = LOG_TCP_REFRESH_HIT; + http->logType = LOG_TCP_REFRESH_HIT; } clientRemoveStoreReference(context, &context->old_sc, &http->old_entry); /* here the data to send is the data we just recieved */ @@ -494,7 +497,7 @@ } else if (result.flags.error) { /* swap in failure */ debug(88, 3) ("clientCacheHit: swapin failure for %s\n", http->uri); - http->log_type = LOG_TCP_SWAPFAIL_MISS; + http->logType = LOG_TCP_SWAPFAIL_MISS; clientRemoveStoreReference(context, &context->sc, &http->entry); clientProcessMiss(context); return; @@ -535,7 +538,7 @@ /* * Got the headers, now grok them */ - assert(http->log_type == LOG_TCP_HIT); + assert(http->logType == LOG_TCP_HIT); switch (varyEvaluateMatch(e, r)) { case VARY_NONE: /* No variance detected. Continue as normal */ @@ -598,28 +601,28 @@ * Previous reply didn't have a Last-Modified header, * we cannot revalidate it. */ - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; clientProcessMiss(context); } else if (r->flags.nocache) { /* * This did not match a refresh pattern that overrides no-cache * we should honour the client no-cache header. */ - http->log_type = LOG_TCP_CLIENT_REFRESH_MISS; + http->logType = LOG_TCP_CLIENT_REFRESH_MISS; clientProcessMiss(context); } else if (r->protocol == PROTO_HTTP) { /* * Object needs to be revalidated * XXX This could apply to FTP as well, if Last-Modified is known. */ - http->log_type = LOG_TCP_REFRESH_MISS; + http->logType = LOG_TCP_REFRESH_MISS; clientProcessExpired(context); } else { /* * We don't know how to re-validate other protocols. Handle * them as if the object has expired. */ - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; clientProcessMiss(context); } } else if (r->flags.ims) { @@ -629,7 +632,7 @@ if (mem->reply->sline.status != HTTP_OK) { debug(88, 4) ("clientCacheHit: Reply code %d != 200\n", mem->reply->sline.status); - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; clientProcessMiss(context); } else if (modifiedSince(e, http->request)) { http->logType = LOG_TCP_IMS_HIT; @@ -637,7 +640,7 @@ } else { time_t timestamp = e->timestamp; MemBuf mb = httpPacked304Reply(e->mem_obj->reply); - http->log_type = LOG_TCP_IMS_HIT; + http->logType = LOG_TCP_IMS_HIT; clientRemoveStoreReference(context, &context->sc, &http->entry); http->entry = e = clientCreateStoreEntry(context, http->request->method, @@ -662,7 +665,7 @@ * plain ol' cache hit */ if (e->mem_status == IN_MEMORY) - http->log_type = LOG_TCP_MEM_HIT; + http->logType = LOG_TCP_MEM_HIT; else if (Config.onoff.offline) http->logType = LOG_TCP_OFFLINE_HIT; clientSendMoreData(context, result); @@ -689,7 +692,7 @@ if (EBIT_TEST(http->entry->flags, ENTRY_SPECIAL)) { debug(88, 0) ("clientProcessMiss: miss on a special object (%s).\n", url); - debug(88, 0) ("\tlog_type = %s\n", log_tags[http->log_type]); + debug(88, 0) ("\tlog_type = %s\n", log_tags[http->logType]); storeEntryDump(http->entry, 1); } clientRemoveStoreReference(context, &context->sc, &http->entry); @@ -722,7 +725,7 @@ if (http->redirect.status) { HttpReply *rep = httpReplyCreate(); #if LOG_TCP_REDIRECTS - http->log_type = LOG_TCP_REDIRECT; + http->logType = LOG_TCP_REDIRECT; #endif storeReleaseRequest(http->entry); httpRedirectReply(rep, http->redirect.status, @@ -774,7 +777,7 @@ Config2.onoff.enable_purge); next = http->client_stream.head->next->data; if (!Config2.onoff.enable_purge) { - http->log_type = LOG_TCP_DENIED; + http->logType = LOG_TCP_DENIED; err = clientBuildError(ERR_ACCESS_DENIED, HTTP_FORBIDDEN, NULL, &http->conn->peer.sin_addr, http->request); @@ -801,7 +804,7 @@ storeCreateMemObject(http->entry, http->uri, http->log_uri); http->entry->mem_obj->method = http->request->method; context->sc = storeClientListAdd(http->entry, context); - http->log_type = LOG_TCP_HIT; + http->logType = LOG_TCP_HIT; context->reqofs = 0; tempBuffer.offset = http->out.offset; tempBuffer.length = next->readBuffer.length; @@ -811,7 +814,7 @@ return; } } - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; /* Release the cached URI */ entry = storeGetPublicByRequestMethod(http->request, METHOD_GET); if (entry) { @@ -1334,9 +1337,9 @@ return; } /* continue forwarding, not finished yet. */ - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; } else - http->log_type = clientIdentifyStoreObject(http); + http->logType = clientIdentifyStoreObject(http); /* We still have to do store logic processing - vary, cache hit etc */ if (context->http->entry != NULL) { /* someone found the object in the cache for us */ @@ -1359,7 +1362,7 @@ #if DELAY_POOLS delaySetStoreClient(context->sc, delayClient(context->http)); #endif - assert(context->http->log_type == LOG_TCP_HIT); + assert(context->http->logType == LOG_TCP_HIT); context->reqofs = 0; assert(http->out.offset == http->out.size && http->out.offset == 0); tempBuffer.offset = context->reqofs; @@ -1368,7 +1371,7 @@ storeClientCopy(context->sc, http->entry, tempBuffer, clientCacheHit, context); } else { - /* MISS CASE, http->log_type is already set! */ + /* MISS CASE, http->logType is already set! */ clientProcessMiss(context); } } Index: squid/src/client_side_request.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client_side_request.c,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -r1.1.2.17 -r1.1.2.18 --- squid/src/client_side_request.c 24 Sep 2002 11:10:04 -0000 1.1.2.17 +++ squid/src/client_side_request.c 24 Sep 2002 11:54:54 -0000 1.1.2.18 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.c,v 1.1.2.17 2002/09/24 11:10:04 rbcollins Exp $ + * $Id: client_side_request.c,v 1.1.2.18 2002/09/24 11:54:54 rbcollins Exp $ * * DEBUG: section 85 Client-side Request Routines AUTHOR: Robert Collins * (Originally Duane Wessels in client_side.c) @@ -276,7 +276,7 @@ * */ page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName); - http->log_type = LOG_TCP_DENIED; + http->logType = LOG_TCP_DENIED; if (answer == ACCESS_REQ_PROXY_AUTH || aclIsProxyAuth(AclMatchedName)) { if (!http->flags.accel) { /* Proxy authorisation needed */ @@ -598,14 +598,14 @@ debug(85, 4) ("clientProcessRequest: %s '%s'\n", RequestMethodStr[r->method], http->uri); if (r->method == METHOD_CONNECT) { - http->log_type = LOG_TCP_MISS; + http->logType = LOG_TCP_MISS; sslStart(http, &http->out.size, &http->al.http.code); return; } else { - http->log_type = LOG_TAG_NONE; + http->logType = LOG_TAG_NONE; } debug(85, 4) ("clientProcessRequest: %s for '%s'\n", - log_tags[http->log_type], http->uri); + log_tags[http->logType], http->uri); /* no one should have touched this */ assert(http->out.offset == 0); /* Use the Stream Luke */ Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.21.2.8 retrieving revision 1.21.2.9 diff -u -r1.21.2.8 -r1.21.2.9 --- squid/src/http.c 24 Sep 2002 11:10:04 -0000 1.21.2.8 +++ squid/src/http.c 24 Sep 2002 11:54:54 -0000 1.21.2.9 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.21.2.8 2002/09/24 11:10:04 rbcollins Exp $ + * $Id: http.c,v 1.21.2.9 2002/09/24 11:54:54 rbcollins Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -847,6 +847,7 @@ /* append Via */ if (Config.onoff.via) { + String strVia; strVia = httpHeaderGetList(hdr_in, HDR_VIA); snprintf(bbuf, BBUF_SZ, "%d.%d %s", orig_request->http_ver.major, @@ -857,13 +858,16 @@ } #if ESI - /* Append Surrogate-Capabilities */ - strVia = httpHeaderGetList(hdr_in, HDR_SURROGATE_CAPABILITY); - snprintf(bbuf, BBUF_SZ, "%s=Surrogate/1.0 ESI/1.0", - Config.Accel.surrogate_id); - strListAdd(&strVia, bbuf, ','); - httpHeaderPutStr(hdr_out, HDR_SURROGATE_CAPABILITY, strBuf(strVia)); - stringClean(&strVia); + { + String strSurrogate; + /* Append Surrogate-Capabilities */ + strSurrogate = httpHeaderGetList(hdr_in, HDR_SURROGATE_CAPABILITY); + snprintf(bbuf, BBUF_SZ, "%s=Surrogate/1.0 ESI/1.0", + Config.Accel.surrogate_id); + strListAdd(&strSurrogate, bbuf, ','); + httpHeaderPutStr(hdr_out, HDR_SURROGATE_CAPABILITY, strBuf(strSurrogate)); + stringClean(&strSurrogate); + } #endif /* append X-Forwarded-For */ Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.59.2.16 retrieving revision 1.59.2.17 diff -u -r1.59.2.16 -r1.59.2.17 --- squid/src/protos.h 24 Sep 2002 11:10:04 -0000 1.59.2.16 +++ squid/src/protos.h 24 Sep 2002 11:54:54 -0000 1.59.2.17 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.59.2.16 2002/09/24 11:10:04 rbcollins Exp $ + * $Id: protos.h,v 1.59.2.17 2002/09/24 11:54:54 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -302,15 +302,6 @@ extern void whoisStart(FwdState *); -#if ESI -/* ESI.c */ -extern CSR esiStreamRead; -extern CSCB esiProcessStream; -extern CSD esiStreamDetach; -extern CSS esiStreamStatus; -extern int esiEnableProcessing (HttpReply *); -#endif - /* http.c */ extern int httpCachable(method_t); extern void httpStart(FwdState *);