From 0ed8bcfc9c7e56e69fbcea215815ef9e28d9c5f7 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 24 Aug 1996 03:24:19 +0000 Subject: [PATCH] - Added debugging output for error pages --- src/errorpage.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/errorpage.cc b/src/errorpage.cc index 6695174eca..b4c0c4fd25 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.29 1996/08/19 22:44:52 wessels Exp $ + * $Id: errorpage.cc,v 1.30 1996/08/23 21:24:19 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -144,6 +144,7 @@ void squid_error_entry(entry, type, msg) if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_entry: type out of range."); index = (int) (type - ERR_MIN); + debug(4, 1, "%s: '%s'\n", ErrorData[index].tag, entry->url); sprintf(tmp_error_buf, SQUID_ERROR_MSG_P1, entry->url, entry->url, @@ -178,11 +179,11 @@ char *squid_error_url(url, method, type, address, code, msg) char *msg; { int index; - *tmp_error_buf = '\0'; if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_url: type out of range."); index = (int) (type - ERR_MIN); + debug(4, 1, "%s: '%s'\n", ErrorData[index].tag, url); sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code); sprintf(tbuf, SQUID_ERROR_MSG_P1, url, @@ -225,10 +226,12 @@ char *squid_error_request(request, type, address, code) char *address; int code; { + int index; *tmp_error_buf = '\0'; if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_request: type out of range."); - + index = (int) (type - ERR_MIN); + debug(4, 1, "%s: '%s'\n", ErrorData[index].tag, request); sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code); sprintf(tbuf, SQUID_REQUEST_ERROR_MSG, request, -- 2.47.3