]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix sending code '0' in HTTP error messages
authorwessels <>
Thu, 16 Jan 1997 06:01:13 +0000 (06:01 +0000)
committerwessels <>
Thu, 16 Jan 1997 06:01:13 +0000 (06:01 +0000)
src/errorpage.cc

index f2b25d8a5f2c0a67e54dae65d15956ea1d60db40..618113603d90e6d15181a97065232f76db29efb8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.52 1996/11/15 17:26:18 wessels Exp $
+ * $Id: errorpage.cc,v 1.53 1997/01/15 23:01:13 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -198,6 +198,8 @@ squid_error_url(const char *url, int method, int type, const char *address, int
     *tmp_error_buf = '\0';
     if (type < ERR_MIN || type > ERR_MAX)
        fatal_dump("squid_error_url: type out of range.");
+    if (!code)
+       code = 500;
     error_index = (int) (type - ERR_MIN);
     debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, url);
     sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code);