--------------------- PatchSet 5891 Date: 2003/08/21 20:43:09 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: changed debugging section to avoid overlapping other modules Members: src/icap.c:1.1.16.7->1.1.16.8 src/icap_opt.c:1.1.2.3->1.1.2.4 Index: squid/src/icap.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap.c,v retrieving revision 1.1.16.7 retrieving revision 1.1.16.8 diff -u -r1.1.16.7 -r1.1.16.8 --- squid/src/icap.c 27 Jun 2003 01:15:18 -0000 1.1.16.7 +++ squid/src/icap.c 21 Aug 2003 20:43:09 -0000 1.1.16.8 @@ -1,9 +1,8 @@ /* - * $Id: icap.c,v 1.1.16.7 2003/06/27 01:15:18 hno Exp $ - * This file has the ICAP client code... + * $Id: icap.c,v 1.1.16.8 2003/08/21 20:43:09 dwsquid Exp $ * - * Author: Geetha Manjunath, - * Hewlett Packard Company + * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client + * AUTHOR: Geetha Manjunath, Hewlett Packard Company * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -78,7 +77,7 @@ icap->enc_res_body = strtol(current, &end, 10); } else { /* invalid header */ - debug(21, 5) ("icapParseEncapsulated: error in: %s\n", current); + debug(81, 5) ("icapParseEncapsulated: error in: %s\n", current); return; } current = end; @@ -109,7 +108,7 @@ float ver; ErrorState *err; - debug(21, 5) ("icapReqModReadReply: FD %d httpState = %p\n", fd, data); + debug(81, 5) ("icapReqModReadReply: FD %d httpState = %p\n", fd, data); statCounter.syscalls.sock.reads++; /* go over the buf till I find icap reply header boundary. @@ -151,7 +150,7 @@ } else { if (!headlen || (read(fd, icap_header, headlen) != headlen)) { /* Did not find a proper ICAP response */ - debug(21, 3) ("ICAP : Error path!\n"); + debug(81, 3) ("ICAP : Error path!\n"); err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->request = requestLink((request_t *) httpState->request); err->xerrno = errno; @@ -161,14 +160,14 @@ } /* Read the ICAP header only - leave the rest */ icap_header[headlen] = '\0'; - debug(21, 3) ("Read icap header : <%s>\n", icap_header); + debug(81, 3) ("Read icap header : <%s>\n", icap_header); ver = -999.999; /* initalize the version to a bogus number. I * think that we should parse it using 2 * integers and a %d.%d scanf format - Basile * june 2002 */ if (sscanf(icap_header, "ICAP/%f %d %s\r", &ver, &status, tmpbuf) < 3 || ver <= 0.0) { - debug(21, 1) ("BAD ICAP status line <%s>\n", icap_header); + debug(81, 1) ("BAD ICAP status line <%s>\n", icap_header); /* is this correct in case of ICAP protocol error? */ err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->request = requestLink((request_t *) httpState->request); @@ -194,7 +193,7 @@ /* Check whether it is a direct reply - if so over to http part */ if (directResponse) { - debug(21, 3) ("icapReqModReadReply: fd %d, ICAP request satisfaction mode\n", fd); + debug(81, 3) ("icapReqModReadReply: fd %d, ICAP request satisfaction mode\n", fd); /* got the reply, no need to come here again */ httpState->icap->state &= ~ICAP_WaitForReply; httpState->icap->state |= ICAP_GotReply; @@ -309,7 +308,7 @@ ErrorState *err; StoreEntry *entry = httpState->entry; - debug(21, 5) ("icapSendReqModDone: FD %d: size %d: errflag %d.\n", + debug(81, 5) ("icapSendReqModDone: FD %d: size %d: errflag %d.\n", fd, size, errflag); if (size > 0) { fd_bytes(fd, size, FD_WRITE); @@ -426,7 +425,7 @@ * Need to check and see if we have to put content length header */ } memBufAppend(&mb, crlf, 2); - debug(21, 3) ("icapSendReqMod: FD %d:\n%s\n", httpState->fd, mb.buf); + debug(81, 3) ("icapSendReqMod: FD %d:\n%s\n", httpState->fd, mb.buf); cbdataLock(httpState); comm_write_mbuf(icap_fd, mb, icapSendReqModDone, httpState); } @@ -499,7 +498,7 @@ float ver; ErrorState *err; - debug(21, 5) ("icapRespModReadReply: FD %d data = %p\n", fd, data); + debug(81, 5) ("icapRespModReadReply: FD %d data = %p\n", fd, data); statCounter.syscalls.sock.reads++; assert(httpState->orig_request); @@ -552,14 +551,14 @@ len = read(fd, icap_header, headlen); if (len > 0) { icap_header[headlen] = '\0'; - debug(21, 3) ("Read icap header : <%s>\n", icap_header); + debug(81, 3) ("Read icap header : <%s>\n", icap_header); ver = -999.999; /* initalize the version to a bogus number. I * think that we should parse it using 2 * integers and a %d.%d scanf format - Basile * june 2002 */ if (sscanf(icap_header, "ICAP/%f %d %s\r", &ver, &status, tmpbuf) < 3 || ver <= 0.0) { - debug(21, 1) ("BAD ICAP status line <%s>\n", icap_header); + debug(81, 1) ("BAD ICAP status line <%s>\n", icap_header); /* is this correct in case of ICAP protocol error? */ err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->request = requestLink((request_t *) httpState->request); @@ -572,7 +571,7 @@ } if ((httpState->icap->state & ICAP_WaitForPreviewReply) != 0) { if (status == 100) { - debug(21, 5) ("icapRespModReadReply: 100 Continue received, httpState=%p\n", httpState); + debug(81, 5) ("icapRespModReadReply: 100 Continue received, httpState=%p\n", httpState); httpState->icap->state &= ~ICAP_WaitForPreviewReply; /* call again icapSendRespMod to handle data that was received while waiting fot this ICAP response */ icapSendRespMod(httpState, NULL, 0, 0); @@ -598,7 +597,7 @@ } if (!headlen || len != headlen || status != 200) { /* Did not find a proper ICAP response */ - debug(21, 3) ("ICAP : Error path!\n"); + debug(81, 3) ("ICAP : Error path!\n"); err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->request = requestLink((request_t *) httpState->request); err->xerrno = errno; @@ -613,7 +612,7 @@ /* Check whether it is a direct reply - if so over to http part */ if (!directResponse) { /* Did not find a proper ICAP response */ - debug(21, 3) ("ICAP : Error path!\n"); + debug(81, 3) ("ICAP : Error path!\n"); err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->request = requestLink((request_t *) httpState->request); err->xerrno = errno; @@ -639,7 +638,7 @@ mem = entry->mem_obj; assert(httpState->icap); - debug(21, 5) ("icapReadResponse: fd %d, httpState %p, ICAP state flags %X\n", fd, httpState, httpState->icap->state); + debug(81, 5) ("icapReadResponse: fd %d, httpState %p, ICAP state flags %X\n", fd, httpState, httpState->icap->state); /* do not delete the ICAP field here. * it is needed to route data now still coming from the HTTP * connection up to the ICAP server @@ -668,16 +667,16 @@ ErrorState *err; StoreEntry *entry = httpState->entry; - debug(21, 5) ("icapSendRespModDone: FD %d: size %d: errflag %d.\n", + debug(81, 5) ("icapSendRespModDone: FD %d: size %d: errflag %d.\n", fd, size, errflag); if (httpState->icap) { - debug(21, 5) ("icapSendRespModDone: ICAP state flags %X\n", httpState->icap->state); + debug(81, 5) ("icapSendRespModDone: ICAP state flags %X\n", httpState->icap->state); } if (cbdataValid(httpState)) { if (httpState->icap && cbdataValid(httpState->icap)) { if ((httpState->icap->state & ICAP_EndOfInputData) == 0) { cbdataLock(httpState); - debug(21, 5) ("icapSendRespModDone: FD %d: commSetSelect on read httpReadReply get more orig data.\n", httpState->icap->http_fd); + debug(81, 5) ("icapSendRespModDone: FD %d: commSetSelect on read httpReadReply get more orig data.\n", httpState->icap->http_fd); commSetSelect(httpState->icap->http_fd, COMM_SELECT_READ, httpReadReply, httpState, 0); } @@ -707,7 +706,7 @@ if (httpState->icap && (httpState->icap->state & (ICAP_WaitForPreviewReply | ICAP_WaitForReply)) != 0) { /* Schedule reading the ICAP response */ - debug(21, 3) ("icapSendRespModDone: FD %d: commSetSelect on read icapRespModReadReply.\n", fd); + debug(81, 3) ("icapSendRespModDone: FD %d: commSetSelect on read icapRespModReadReply.\n", fd); commSetSelect(fd, COMM_SELECT_READ, icapRespModReadReply, httpState, 0); cbdataLock(httpState); if ((httpState->icap->state & (ICAP_WaitForPreviewReply | ICAP_EndOfInputData)) != 0) { @@ -755,7 +754,7 @@ int size; const int preview_size = icap->preview_size; char ch; - debug(21, 5) ("icapSendRespMod: httpState %p: len %d, theEnd %d, icap state %X.\n", + debug(81, 5) ("icapSendRespMod: httpState %p: len %d, theEnd %d, icap state %X.\n", httpState, len, theEnd, icap->state); memBufDefInit(&mb); @@ -781,7 +780,7 @@ if (size > preview_size + 1) size = preview_size + 1; size -= icap->buffer.size; - debug(21, 3) ("icapSendRespMod: FD %d: copy %d more bytes to preview buffer.\n", icap->http_fd, size); + debug(81, 3) ("icapSendRespMod: FD %d: copy %d more bytes to preview buffer.\n", icap->http_fd, size); memBufAppend(&icap->buffer, buf, size); buf = ((char *) buf) + size; len -= size; @@ -810,7 +809,7 @@ ch = icap->buffer.buf[preview_size]; memBufReset(&icap->buffer); /* will now be used for other data */ memBufAppend(&icap->buffer, &ch, 1); - debug(21, 3) ("icapSendRespMod: FD %d: sending preview and keeping %d bytes in internal buf.\n", icap->http_fd, len + 1); + debug(81, 3) ("icapSendRespMod: FD %d: sending preview and keeping %d bytes in internal buf.\n", icap->http_fd, len + 1); if (len > 0) memBufAppend(&icap->buffer, buf, len); } @@ -819,14 +818,14 @@ } else if ((icap->state & ICAP_WaitForPreviewReply) != 0) { /* received new data while waiting for preview response */ /* add data to internal buffer and send later */ - debug(21, 3) ("icapSendRespMod: FD %d: add %d more bytes to internal buf while wiaiting for preview-response.\n", icap->http_fd, len); + debug(81, 3) ("icapSendRespMod: FD %d: add %d more bytes to internal buf while wiaiting for preview-response.\n", icap->http_fd, len); if (len > 0) memBufAppend(&icap->buffer, buf, len); /* do not send any data now while waiting for preview response */ /* but prepare for read more data on the HTTP connection */ if ((icap->state & ICAP_EndOfInputData) == 0) { cbdataLock(httpState); - debug(21, 3) ("icapSendRespMod: FD %d: commSetSelect on read httpReadReply waiting for preview response.\n", icap->http_fd); + debug(81, 3) ("icapSendRespMod: FD %d: commSetSelect on read httpReadReply waiting for preview response.\n", icap->http_fd); commSetSelect(icap->http_fd, COMM_SELECT_READ, httpReadReply, httpState, 0); } @@ -878,7 +877,7 @@ HttpReply *reply = httpState->entry->mem_obj->reply; icap_service *service; - debug(21, 5) ("icapbuildRespModHeader: httpState %p: len %d.\n", httpState, + debug(81, 5) ("icapbuildRespModHeader: httpState %p: len %d.\n", httpState, len); /* Copy request header */ memBufDefInit(&mb_hdr); @@ -937,7 +936,7 @@ if (httpState->orig_request->flags.do_icap) if (startICAPrespmod(httpState) >= 0) return; - debug(21, 3) ("scheduleReadReply: FD %d, httpState %p: call httpReadReply directly.\n", fd, httpState); + debug(81, 3) ("scheduleReadReply: FD %d, httpState %p: call httpReadReply directly.\n", fd, httpState); httpReadReply(fd, httpState); } @@ -1025,7 +1024,7 @@ icap->chunk_size = -1; memBufDefInit(&icap->buffer); - debug(21, 3) ("New ICAP connection: fd %d\n", fd); + debug(81, 3) ("New ICAP connection: fd %d\n", fd); return icap; } @@ -1353,7 +1352,7 @@ int bufOffset; if (httpState->icap->chunk_size == -2) { - debug(21, 3) ("zero end chunk reached\n"); + debug(81, 3) ("zero end chunk reached\n"); len = 0; /* don't add anything else */ } else if (httpState->reply_hdr_state == 2 && httpState->icap->chunk_size >= 0) { /* read data which is transfered in chunked encoding */ @@ -1372,9 +1371,9 @@ while (bufOffset < len) { if (httpState->icap->chunk_size == 0) { bufOffset += icapReadChunkSize(httpState->icap, buf + bufOffset, len - bufOffset); - debug(21, 3) ("got chunksize %d, new offset %d\n", httpState->icap->chunk_size, bufOffset); + debug(81, 3) ("got chunksize %d, new offset %d\n", httpState->icap->chunk_size, bufOffset); if (httpState->icap->chunk_size == -2) { - debug(21, 3) ("zero end chunk reached\n"); + debug(81, 3) ("zero end chunk reached\n"); len = 0; /* don't add anything else */ /* break; */ /* let's try to close the connection here */ Index: squid/src/icap_opt.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_opt.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/icap_opt.c 27 Jun 2003 01:15:18 -0000 1.1.2.3 +++ squid/src/icap_opt.c 21 Aug 2003 20:43:09 -0000 1.1.2.4 @@ -1,8 +1,8 @@ /* - * $Id: icap_opt.c,v 1.1.2.3 2003/06/27 01:15:18 hno Exp $ + * $Id: icap_opt.c,v 1.1.2.4 2003/08/21 20:43:09 dwsquid Exp $ * - * DEBUG: section 21 ICAP OPTIONS request + * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client OPTIONS * AUTHOR: Ralf Horstmann * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -99,7 +99,7 @@ int ctimeout = TIMEOUT; const char *host = s->hostname; unsigned short port = s->port; - debug(21, 3) ("icapOptStart: starting OPTIONS request for %s (%s)\n", s->name, s->uri); + debug(81, 3) ("icapOptStart: starting OPTIONS request for %s (%s)\n", s->name, s->uri); fd = comm_open(SOCK_STREAM, 0, no_addr, @@ -107,7 +107,7 @@ COMM_NONBLOCKING, "ICAP OPTIONS connection"); if (fd < 0) { - debug(21, 4) ("icapConnectStart: %s\n", xstrerror()); + debug(81, 4) ("icapConnectStart: %s\n", xstrerror()); eventAdd("icapOptStart", icapOptStart, s, OPTIONS_DEFAULT_TTL, 1); return; } @@ -126,7 +126,7 @@ IcapOptData *i = s->opt; int valid; - debug(21, 3) ("icapOptConnectTimeout: fd=%d, service=%s\n", fd, s->uri); + debug(81, 3) ("icapOptConnectTimeout: fd=%d, service=%s\n", fd, s->uri); comm_close(fd); valid = cbdataValid(s); @@ -159,7 +159,7 @@ return; } if (status != COMM_OK) { - debug(21, 3) ("icapOptConnectDone: Connection not ok\n"); + debug(81, 3) ("icapOptConnectDone: Connection not ok\n"); comm_close(server_fd); icapOptDataFree(i); s->opt = NULL; @@ -167,7 +167,7 @@ eventAdd("icapOptStart", icapOptStart, s, OPTIONS_DEFAULT_TTL, 1); return; } - debug(21, 3) ("icapOptConnectDone: Connection ok. Sending Options request for %s\n", s->name); + debug(81, 3) ("icapOptConnectDone: Connection ok. Sending Options request for %s\n", s->name); memBufDefInit(&request); memBufPrintf(&request, "OPTIONS %s ICAP/1.0\r\n", s->uri); memBufPrintf(&request, "Host: %s\r\n", s->hostname); @@ -193,7 +193,7 @@ icapOptDataFree(i); return; } - debug(21, 5) ("icapOptWriteComplete: FD %d: size %d: errflag %d.\n", + debug(81, 5) ("icapOptWriteComplete: FD %d: size %d: errflag %d.\n", fd, size, errflag); if (size > 0) { fd_bytes(fd, size, FD_WRITE); @@ -235,21 +235,21 @@ printf("PANIC: not enough memory\n"); #if 0 i->buf = memReallocBuf(i->buf, i->size * 2, &i->size); - debug(21, 2) ("icapoptReadReply: growing reply buffer: offset=%ld size=%ld\n", + debug(81, 2) ("icapoptReadReply: growing reply buffer: offset=%ld size=%ld\n", (long) i->offset, (long) i->size); len = i->size - i->offset - 1; #endif } size = FD_READ_METHOD(fd, i->buf + i->offset, len); i->offset += size; - debug(21, 3) ("icapOptReadReply: Got %d bytes of data\n", size); + debug(81, 3) ("icapOptReadReply: Got %d bytes of data\n", size); if (size > 0) { /* do some statistics */ fd_bytes(fd, size, FD_READ); /* kb_incr(&statCounter.client_http.kbytes_in, size); */ } if (size < 0) { - debug(21, 3) ("icapOptReadReply: FD %d: read failure: %s.\n", fd, xstrerror()); + debug(81, 3) ("icapOptReadReply: FD %d: read failure: %s.\n", fd, xstrerror()); s->unreachable = 1; icapOptDataFree(i); s->opt = NULL; @@ -257,15 +257,15 @@ comm_close(fd); } else if (size == 0) { /* no more data, now we can parse the reply */ - debug(21, 3) ("icapOptReadReply: FD %d: connection closed\n", fd); + debug(81, 3) ("icapOptReadReply: FD %d: connection closed\n", fd); i->buf[i->offset] = '\0'; /* for string functions */ s->unreachable = 0; if (icapOptParseReply(s, i->buf) && s->options_ttl > 0) { - debug(21, 3) ("icapOptReadReply: OPTIONS request successful. scheduling again in %d seconds\n", s->options_ttl); + debug(81, 3) ("icapOptReadReply: OPTIONS request successful. scheduling again in %d seconds\n", s->options_ttl); eventAdd("icapOptStart", icapOptStart, s, s->options_ttl, 1); } else { /* use a default ttl */ - debug(21, 3) ("icapOptReadReply: OPTIONS request not successful. scheduling again in %d seconds\n", OPTIONS_DEFAULT_TTL); + debug(81, 3) ("icapOptReadReply: OPTIONS request not successful. scheduling again in %d seconds\n", OPTIONS_DEFAULT_TTL); eventAdd("icapOptStart", icapOptStart, s, OPTIONS_DEFAULT_TTL, 1); } icapOptDataFree(i); @@ -313,18 +313,18 @@ int new; if (!name_len || name_end > blk_end) { - debug(21, 5) ("icapOptParseEntry: strange header. skipping\n"); + debug(81, 5) ("icapOptParseEntry: strange header. skipping\n"); return; } if (name_len > 65536) { - debug(21, 5) ("icapOptParseEntry: unusual long header item. skipping.\n"); + debug(81, 5) ("icapOptParseEntry: unusual long header item. skipping.\n"); return; } while (xisspace(*value_start) && value_start < blk_end) { value_start++; } if (value_start >= blk_end) { - debug(21, 5) ("icapOptParseEntry: no value found\n"); + debug(81, 5) ("icapOptParseEntry: no value found\n"); return; } value_len = blk_end - value_start; @@ -332,72 +332,72 @@ /* extract information */ if (!strncmp("Allow", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Allow\n"); + debug(81, 5) ("icapOptParseEntry: found Allow\n"); if (!strncmp("204", value_start, 3)) { s->flags.allow_204 = 1; } else { - debug(21, 3) ("icapOptParseEntry: Allow value unknown"); + debug(81, 3) ("icapOptParseEntry: Allow value unknown"); } } else if (!strncmp("Connection", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Connection\n"); + debug(81, 5) ("icapOptParseEntry: found Connection\n"); } else if (!strncmp("Encapsulated", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Encapsulated\n"); + debug(81, 5) ("icapOptParseEntry: found Encapsulated\n"); } else if (!strncmp("ISTAG", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found ISTAG\n"); + debug(81, 5) ("icapOptParseEntry: found ISTAG\n"); stringClean(&s->istag); stringLimitInit(&s->istag, value_start, value_len); } else if (!strncmp("Max-Connections", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Max-Connections\n"); + debug(81, 5) ("icapOptParseEntry: found Max-Connections\n"); errno = 0; new = strtol(value_start, NULL, 10); if (errno) { - debug(21, 5) ("icapOptParseEntry: Max-Connections: could not parse value\n"); + debug(81, 5) ("icapOptParseEntry: Max-Connections: could not parse value\n"); } else { - debug(21, 5) ("icapOptParseEntry: Max-Connections: new value=%d\n", new); + debug(81, 5) ("icapOptParseEntry: Max-Connections: new value=%d\n", new); s->max_connections = new; } } else if (!strncmp("Methods", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Methods\n"); + debug(81, 5) ("icapOptParseEntry: found Methods\n"); } else if (!strncmp("Options-TTL", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Options-TTL\n"); + debug(81, 5) ("icapOptParseEntry: found Options-TTL\n"); errno = 0; new = strtol(value_start, NULL, 10); if (errno) { - debug(21, 5) ("icapOptParseEntry: Options-TTL: could not parse value\n"); + debug(81, 5) ("icapOptParseEntry: Options-TTL: could not parse value\n"); } else { - debug(21, 5) ("icapOptParseEntry: Options-TTL: new value=%d\n", new); + debug(81, 5) ("icapOptParseEntry: Options-TTL: new value=%d\n", new); s->options_ttl = new; } } else if (!strncmp("Preview", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Preview\n"); + debug(81, 5) ("icapOptParseEntry: found Preview\n"); errno = 0; new = strtol(value_start, NULL, 10); if (errno) { - debug(21, 5) ("icapOptParseEntry: Preview: could not parse value\n"); + debug(81, 5) ("icapOptParseEntry: Preview: could not parse value\n"); } else { - debug(21, 5) ("icapOptParseEntry: Preview: new value=%d\n", new); + debug(81, 5) ("icapOptParseEntry: Preview: new value=%d\n", new); s->preview = new; } } else if (!strncmp("Service", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Service\n"); + debug(81, 5) ("icapOptParseEntry: found Service\n"); } else if (!strncmp("Service-ID", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Service-ID\n"); + debug(81, 5) ("icapOptParseEntry: found Service-ID\n"); } else if (!strncmp("Transfer-Preview", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Transfer-Preview\n"); + debug(81, 5) ("icapOptParseEntry: found Transfer-Preview\n"); stringClean(&s->transfer_preview); stringLimitInit(&s->transfer_preview, value_start, value_len); } else if (!strncmp("Transfer-Ignore", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Transfer-Ignore\n"); + debug(81, 5) ("icapOptParseEntry: found Transfer-Ignore\n"); stringClean(&s->transfer_ignore); stringLimitInit(&s->transfer_ignore, value_start, value_len); } else if (!strncmp("Transfer-Complete", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found Transfer-Complete\n"); + debug(81, 5) ("icapOptParseEntry: found Transfer-Complete\n"); stringClean(&s->transfer_complete); stringLimitInit(&s->transfer_complete, value_start, value_len); } else if (!strncmp("X-Include", blk_start, name_len)) { - debug(21, 5) ("icapOptParseEntry: found X-Include\n"); + debug(81, 5) ("icapOptParseEntry: found X-Include\n"); } else { - debug(21, 5) ("icapOptParseEntry: unknown options header\n"); + debug(81, 5) ("icapOptParseEntry: unknown options header\n"); } } @@ -416,19 +416,19 @@ if (sscanf(buf, "ICAP/%f %d %s\r", &ver, &status, tmpbuf) < 3 || ver <= 0.0) { - debug(21, 2) ("icapOptParseReply: bad status line <%s>\n", buf); + debug(81, 2) ("icapOptParseReply: bad status line <%s>\n", buf); return 0; } - debug(21, 3) ("icapOptParseReply: got reply: \n", ver, status, tmpbuf); + debug(81, 3) ("icapOptParseReply: got reply: \n", ver, status, tmpbuf); if (status != 200) { - debug(21, 3) ("icapOptParseReply: status = %d != 200", status); + debug(81, 3) ("icapOptParseReply: status = %d != 200", status); return 0; } parse_start = buf; headlen = headersEnd(parse_start, s->opt->offset); if (!headlen) { - debug(21, 2) ("icapOptParseReply: end of headers could not be found\n"); + debug(81, 2) ("icapOptParseReply: end of headers could not be found\n"); return 0; } head_end = parse_start + headlen - 1; @@ -440,13 +440,13 @@ /* skip status line */ if (!icapIsolateLine(&parse_start, &blk_start, &blk_end)) { - debug(21, 3) ("icapOptParseReply: failure in isolating status line\n"); + debug(81, 3) ("icapOptParseReply: failure in isolating status line\n"); return 0; } /* now we might start real parsing */ while (icapIsolateLine(&parse_start, &blk_start, &blk_end)) { if (blk_end > head_end || blk_start > head_end || blk_start >= blk_end) { - debug(21, 3) ("icapOptParseReply: header limit exceeded. finished.\n"); + debug(81, 3) ("icapOptParseReply: header limit exceeded. finished.\n"); break; } icapOptParseEntry(s, blk_start, blk_end);