==============================================================================
+Changes to squid-1.0.11 (August 30, 1996):
+
+ - Fixed ENTRY_DISPATCHED bug. Now set ENTRY_DISPATCHED
+ only in getFromCache().
+ - Added missing newlines to a number of debug messages.
+ - NULL-terminate long URL's in urlParse().
+ - Changed configure to remove libmalloc for FreeBSD
+ - Changed ftpget to assume a single space between date and
+ filename in Unix sytle listings.
+ - Added urlCheck() to check for supported method/protocol
+ combinations and return "501 Not Implemented" when
+ appropriate.
+ - Added ftpget check for negative port numbers in PASV
+ reply.
+ - Added shadow password support for cachemgr shutdown.
+
Changes to squid-1.0.10 (August 26, 1996):
- Fixed INADDR_NONE not being set for ftpget.c.
-# From configure.in Revision: 1.28
+# From configure.in Revision: 1.29
ac_aux_dir=
for ac_dir in aux $srcdir/aux; do
if test -f $ac_dir/install-sh; then
CFLAGS="`echo $CFLAGS | sed -e s/-O//`"
fi
;;
+ i386-*-freebsd*)
+ echo "Removing -lmalloc for FreeBSD..."
+ LIBS=`echo $LIBS | sed -e s/-lmalloc//`
+ HAVE_LIBMALLOC="no"
+ ;;
*-sgi-irix*)
echo "Removing -lsocket for IRIX..."
LIBS=`echo $LIBS | sed -e s/-lsocket//`
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2189 "configure"
+#line 2194 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
SQUID_FD_SETSIZE=256
else
cat > conftest.$ac_ext <<EOF
-#line 2239 "configure"
+#line 2244 "configure"
#include "confdefs.h"
#include <unistd.h>
SQUID_UDP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2309 "configure"
+#line 2314 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_UDP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2345 "configure"
+#line 2350 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_SNDBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2381 "configure"
+#line 2386 "configure"
#include "confdefs.h"
#include <sys/types.h>
SQUID_TCP_SO_RCVBUF=8192
else
cat > conftest.$ac_ext <<EOF
-#line 2417 "configure"
+#line 2422 "configure"
#include "confdefs.h"
#include <sys/types.h>
echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2450 "configure"
+#line 2455 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() { return 0; }
echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2474 "configure"
+#line 2479 "configure"
#include "confdefs.h"
extern int _dns_ttl_;
int main() { return 0; }
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.29 1996/08/27 20:10:47 wessels Exp $
+dnl $Id: configure.in,v 1.30 1996/08/30 23:25:59 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.29 $)dnl
+AC_REVISION($Revision: 1.30 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(aux)
CFLAGS="`echo $CFLAGS | sed -e s/-O//`"
fi
;;
+ i386-*-freebsd*)
+ echo "Removing -lmalloc for FreeBSD..."
+ LIBS=`echo $LIBS | sed -e s/-lmalloc//`
+ HAVE_LIBMALLOC="no"
+ ;;
*-sgi-irix*)
echo "Removing -lsocket for IRIX..."
LIBS=`echo $LIBS | sed -e s/-lsocket//`
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#endif /* _POSIX_SOURCE_ */
+#endif /* __NeXT__ */
+
#if HAVE_STDIO_H
#include <stdio.h>
#endif
-#endif /* __NeXT__ */
-
#if HAVE_ERRNO_H
#include <errno.h>
#endif
#include <unistd.h>
#endif
+#ifndef FILENAME_MAX
+#define FILENAME_MAX 1024
+#endif
+
#define P_tmpdir "/tmp"
/* These are the characters used in temporary filenames. */
/*
- * $Id: cachemgr.cc,v 1.16 1996/08/26 19:57:02 wessels Exp $
+ * $Id: cachemgr.cc,v 1.17 1996/08/30 23:23:27 wessels Exp $
*
* DEBUG: Section 0 CGI Cache Manager
* AUTHOR: Harvest Derived
printf("<ADDRESS>\n");
printf("Generated %s, by %s/%s@%s\n",
tbuf, progname, SQUID_VERSION, getfullhostname());
- printf("</ADDRESS>\n");
+ printf("</ADDRESS></BODY></HTML>\n");
}
void noargs_html()
{
printf("\r\n\r\n");
- printf("<TITLE>Cache Manager Interface</TITLE>\n");
- printf("<H1>Cache Manager Interface</H1>\n");
- printf("<P>\n");
- printf("This is a WWW interface to the instrumentation interface ");
- printf("for the Squid object cache.\n");
+ printf("<HTML><HEAD><TITLE>Cache Manager Interface</TITLE></HEAD>\n");
+ printf("<BODY><H1>Cache Manager Interface</H1>\n");
+ printf("<p>This is a WWW interface to the instrumentation interface\n");
+ printf("for the Squid object cache.</p>\n");
printf("<HR>\n");
- printf("<P>\n");
- printf("<FORM METHOD=\"POST\" ACTION=\"%s\">\n", script_name);
printf("<PRE>\n");
- printf("<BR><STRONG>Cache Host:</STRONG><INPUT NAME=\"host\" ");
- printf("SIZE=30 VALUE=\"%s\">\n", CACHEMGR_HOSTNAME);
- printf("<BR><STRONG>Cache Port:</STRONG><INPUT NAME=\"port\" ");
- printf("SIZE=30 VALUE=\"%d\">\n", CACHE_HTTP_PORT);
- printf("<BR><STRONG>Password :</STRONG><INPUT TYPE=\"password\" ");
- printf("NAME=\"password\" SIZE=30 VALUE=\"\">\n");
- printf("<BR><STRONG>URL :</STRONG><INPUT NAME=\"url\" ");
- printf("SIZE=30 VALUE=\"\">\n");
- printf("<BR><STRONG>Operation :</STRONG>");
+ printf("<FORM METHOD=\"POST\" ACTION=\"%s\">\n", script_name);
+ printf("<STRONG>Cache Host:</STRONG><INPUT NAME=\"host\" ");
+ printf("SIZE=30 VALUE=\"%s\">\n\n", CACHEMGR_HOSTNAME);
+ printf("<STRONG>Cache Port:</STRONG><INPUT NAME=\"port\" ");
+ printf("SIZE=30 VALUE=\"%d\">\n\n", CACHE_HTTP_PORT);
+ printf("<STRONG>Password :</STRONG><INPUT TYPE=\"password\" ");
+ printf("NAME=\"password\" SIZE=30 VALUE=\"\">\n\n");
+ printf("<STRONG>URL :</STRONG><INPUT NAME=\"url\" ");
+ printf("SIZE=30 VALUE=\"\">\n\n");
+ printf("<STRONG>Operation :</STRONG>");
printf("<SELECT NAME=\"operation\">\n");
printf("<OPTION SELECTED VALUE=\"info\">Cache Information\n");
printf("<OPTION VALUE=\"squid.conf\">Cache Configuration File\n");
#ifdef REMOVE_OBJECT
printf("<OPTION VALUE=\"remove\">Remove Object (URL required)\n");
#endif
- printf("</SELECT>\n");
- printf("</PRE>\n");
+ printf("</SELECT>\n\n");
printf("<HR>\n");
- printf("<BR><INPUT TYPE=\"submit\"> <INPUT TYPE=\"reset\">\n");
- printf("</FORM>\n");
+ printf("<INPUT TYPE=\"submit\"> <INPUT TYPE=\"reset\">\n");
+ printf("</FORM></PRE>\n");
print_trailer();
}
else if (!strncmp(entries[x].name, "port", 4))
portnum = atoi(entries[x].val);
else {
- printf("<P><B>Unknown CGI parameter: %s</B></P>\n",
+ printf("<P><STRONG>Unknown CGI parameter: %s</STRONG></P>\n",
entries[x].name);
noargs_html();
exit(0);
}
if (hostname[0] == '\0') {
printf("<H1>ERROR</H1>\n");
- printf("<P><B>You must provide a hostname!\n</B></P><HR>");
+ printf("<P><STRONG>You must provide a hostname!\n</STRONG></P><HR>");
noargs_html();
exit(0);
}
time_val = time(NULL);
time_string = ctime(&time_val);
- printf("<TITLE>Cache Manager: %s:%s:%d</TITLE>\n", operation, hostname, portnum);
- printf("<FORM METHOD=\"POST\" ACTION=\"%s\">\n", script_name);
+ printf("<HTML><HEAD><TITLE>Cache Manager: %s:%s:%d</TITLE></HEAD>\n",
+ operation, hostname, portnum);
+ printf("<BODY><FORM METHOD=\"POST\" ACTION=\"%s\">\n", script_name);
printf("<INPUT TYPE=\"submit\" VALUE=\"Refresh\">\n");
printf("<SELECT NAME=\"operation\">\n");
printf("<OPTION SELECTED VALUE=\"%s\">Current\n", operation);
printf("<INPUT TYPE=\"hidden\" NAME=\"port\" VALUE=\"%d\">\n", portnum);
printf("<INPUT TYPE=\"hidden\" NAME=\"password\" VALUE=\"NOT_PERMITTED\">\n");
printf("</FORM>");
- printf("<H3><I><A HREF=\"%s\">Empty form</A></H3></I>\n", script_name);
+ printf("<p><em><A HREF=\"%s\">Empty form</A></em></p>\n", script_name);
printf("<HR>\n");
- printf("<H3>%s: %s:%d - dated %s</H3><P>", operation,
- hostname, portnum, time_string);
+ printf("<H1>%s: %s:%d</H1>\n", operation,
+ hostname, portnum);
+ printf("<p>dated %s</p>\n", time_string);
printf("<PRE>\n");
/* Connect to the server */
}
if ((conn = client_comm_connect(conn, hostname, portnum)) < 0) {
printf("Error: connecting to cache mgr: %s:%d\n", hostname, portnum);
- printf("%s</PRE>\n", xstrerror());
+ printf("%s</PRE></BODY></HTML>\n", xstrerror());
exit(1);
}
bytesWritten = write(conn, msg, strlen(msg));
break;
case PARAM:
if (hasTables) {
- printf("<table border=1><td><B>Parameter</B><td><B>Value</B><td><B>Description</B><tr>\n");
+ printf("<table border=1><tr><td><STRONG>Parameter</STRONG><td><STRONG>Value</STRONG><td><STRONG>Description</STRONG>\n");
in_table = 1;
} else {
- printf("<B>\n %20s %10s %s</B><HR>\n", "Parameter", "Value", "Description");
+ printf("\n Parameter Value Description\n");
+ printf("-------------- ------- -------------------------------------\n");
}
break;
case STATS_U:
if (hasTables) {
- printf("<table border=1><td><B>Protocol</B><td><B>Count</B><td><B>Max KB</B><td><B>Current KB</B><td><B>Min KB</B><td><B>Hit Ratio</B><td><B>Transfer Rate</B><td><B>References</B><td><B>Transfered KB</B><tr>\n");
+ printf("<table border=1><tr><td><STRONG>Protocol</STRONG><td><STRONG>Count</STRONG><td><STRONG>Max KB</STRONG><td><STRONG>Current KB</STRONG><td><STRONG>Min KB</STRONG><td><STRONG>Hit Ratio</STRONG><td><STRONG>Transfer Rate</STRONG><td><STRONG>References</STRONG><td><STRONG>Transfered KB</STRONG>\n");
in_table = 1;
} else {
- printf("<B>Protocol | Count | Maximum | Current | Minimum | Hit | Transfer | Reference | Transfered |</B>\n");
- printf("<B> | | KB | KB | KB | Ratio | Rate | Count | KB |</B>\n");
- printf("<B>---------|-------|----------|----------|---------|-------|----------|-----------|------------|</B>\n");
+ printf("Protocol Count Maximum Current Minimum Hit Trans Transfer Transfered\n");
+ printf(" KB KB KB Rate KB/sec Count KB\n");
+ printf("-------- ------- --------- --------- --------- ---- ------ --------- ----------\n");
}
break;
default:
d1 = 0;
sscanf(reserve, "%s %d \"%[^\"]", s1, &d1, s2);
if (hasTables)
- printf("<tr><td><B>%s</B><td>%d<td>%s\n", s1, d1, s2 + 2);
+ printf("<tr><td><STRONG>%s</STRONG><td ALIGN=\"right\">%d<td>%s\n", s1, d1, s2 + 2);
else
- printf(" %20s %10d %s\n", s1, d1, s2 + 2);
+ printf("%14s %7d %s\n", s1, d1, s2 + 2);
break;
case STATS_U:
p_state = 1;
sscanf(reserve, "%s %d %d %d %d %f %d %d %d",
s1, &d1, &d2, &d3, &d4, &f1, &d5, &d6, &d7);
if (hasTables)
- printf("<tr><td align=right><B>%s</B><td align=right>%d<td align=right>%d<td align=right>%d<td align=right>%d<td align=right>%4.2f<td align=right>%d<td align=right>%d<td align=right>%d",
+ printf("<tr><td align=\"right\"><B>%s</B><td align=\"right\">%d<td align=\"right\">%d<td align=\"right\">%d<td align=\"right\">%d<td align=\"right\">%4.2f<td align=\"right\">%d<td align=\"right\">%d<td align=\"right\">%d",
s1, d1, d2, d3, d4, f1, d5, d6, d7);
else
- printf("%8s %7d %10d %10d %9d %4.2f %10d %10d %10d<BR>\n",
+ printf("%8s %7d %9d %9d %9d %4.2f %6d %9d %10d\n",
s1, d1, d2, d3, d4, f1, d5, d6, d7);
break;
case STATS_O:
/*
- * $Id: errorpage.cc,v 1.34 1996/08/29 16:54:22 wessels Exp $
+ * $Id: errorpage.cc,v 1.35 1996/08/30 23:23:28 wessels Exp $
*
* DEBUG: section 4 Error Generation
* AUTHOR: Duane Wessels
#include "squid.h"
#define SQUID_ERROR_MSG_P1 "\
+<HTML><HEAD>\n\
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>\n\
+</HEAD><BODY>\n\
+<H1>ERROR</H1>\n\
<H2>The requested URL could not be retrieved</H2>\n\
<HR>\n\
<P>\n\
<HR>\n\
<ADDRESS>\n\
Generated by %s/%s@%s\n\
-</ADDRESS>\n\
+</ADDRESS></BODY></HTML>\n\
\n"
typedef struct {
{"ERR_INVALID_REQUEST",
"Invalid HTTP request",
"Please double check it, or ask for assistance."},
+ {"ERR_UNSUP_REQUEST",
+ "Unsupported request",
+ "This request method is not supported for this protocol."},
{"ERR_INVALID_URL",
"Invalid URL syntax",
"Please double check it, or ask for assistance."},
"The system disk is out of space or failing."},
{"ERR_ZERO_SIZE_OBJECT",
"No Object Data",
- "The remote server closed the connection before sending any data."}
+ "The remote server closed the connection before sending any data."},
+ {"ERR_PROXY_DENIED",
+ "Access Denied",
+ "You must authenticate yourself before accessing this cache."}
};
/* GLOBAL */
#define SQUID_REQUEST_ERROR_MSG "\
-<TITLE>ERROR: Invalid HTTP Request</TITLE>\n\
+<HTML><HEAD><TITLE>ERROR: Invalid HTTP Request</TITLE></HEAD>\n\
+<BODY><H1>ERROR</H1>\n\
<H2>Invalid HTTP Request</H2>\n\
<HR>\n\
<PRE>\n\
<HR>\n\
<ADDRESS>\n\
Generated by %s/%s@%s\n\
-</ADDRESS>\n\
+</ADDRESS></BODY></HTML>\n\
\n"
char *squid_error_request(request, type, address, code)
HTTP/1.0 %d Cache Access Denied\r\n\
Content-type: text/html\r\n\
\r\n\
-<TITLE>Cache Access Denied</TITLE>\n\
+<HTML><HEAD><TITLE>Cache Access Denied</TITLE></HEAD>\n\
+<BODY><H1>Error</H1>\n\
<H2>Access Denied</H2>\n\
<P>\n\
Sorry, you are not currently allowed to request\n\
/*
- * $Id: fqdncache.cc,v 1.12 1996/08/30 22:38:15 wessels Exp $
+ * $Id: fqdncache.cc,v 1.13 1996/08/30 23:23:29 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
fqdncache_entry *i;
dnsserver_t *dnsData;
if (!fqdncacheQueueHead)
- return 0;
+ return 0;
while ((dnsData = dnsGetFirstAvailable()) && (i = fqdncacheDequeue()))
- fqdncache_dnsDispatch(dnsData, i);
+ fqdncache_dnsDispatch(dnsData, i);
return 1;
}
-
/*
- * $Id: gopher.cc,v 1.39 1996/08/26 19:16:05 wessels Exp $
+ * $Id: gopher.cc,v 1.40 1996/08/30 23:23:31 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
LOCAL_ARRAY(char, tmpbuf, TEMP_BUF_SIZE);
if (!data->data_in) {
- sprintf(tmpbuf, "<HR><H2><i>Server Return Nothing.</i></H2>\n");
+ sprintf(tmpbuf, "<HTML><HEAD><TITLE>Server Return Nothing.</TITLE>\n\
+ </HEAD><BODY><HR><H1>Server Return Nothing.</H1></BODY></HTML>\n");
storeAppend(data->entry, tmpbuf, strlen(tmpbuf));
return;
}
entry = data->entry;
if (data->conversion == HTML_INDEX_PAGE) {
- sprintf(outbuf, "<TITLE>Gopher Index %s</TITLE><H1>%s<BR>Gopher Search</H1> This is a searchable Gopher index.Use the search function of your browser to enter search terms. <ISINDEX>\n", entry->url, entry->url);
-
+ sprintf(outbuf, "<HTML><HEAD><TITLE>Gopher Index %s</TITLE></HEAD>\n\
+ <BODY><H1>%s<BR>Gopher Search</H1>\n\
+ <p>This is a searchable Gopher index. Use the search\n\
+ function of your browser to enter search terms.\n\
+ <ISINDEX></BODY></HTML>\n", entry->url, entry->url);
storeAppend(entry, outbuf, strlen(outbuf));
/* now let start sending stuff to client */
BIT_RESET(entry->flag, DELAY_SENDING);
return;
}
if (data->conversion == HTML_CSO_PAGE) {
- sprintf(outbuf, "<TITLE>CSO Search of %s</TITLE><H1>%s<BR>CSO Search</H1>A CSO database usually contains a phonebook or directory. Use the search function of your browser to enter search terms.<ISINDEX>\n",
+ sprintf(outbuf, "<HTML><HEAD><TITLE>CSO Search of %s</TITLE></HEAD>\n\
+ <BODY><H1>%s<BR>CSO Search</H1>\n\
+ <P>A CSO database usually contains a phonebook or\n\
+ directory. Use the search function of your browser to enter\n\
+ search terms.</P><ISINDEX></BODY></HTML>\n",
entry->url, entry->url);
storeAppend(entry, outbuf, strlen(outbuf));
if (!data->HTML_header_added) {
if (data->conversion == HTML_CSO_RESULT)
- strcat(outbuf, "<H1>CSO Searchs Result</H1>\n<PRE>\n");
+ strcat(outbuf, "<HTML><HEAD><TITLE>CSO Searchs Result</TITLE></HEAD>\n\
+ <BODY><H1>CSO Searchs Result</H1>\n<PRE>\n");
else
- strcat(outbuf, "<H1>Gopher Menu</H1>\n<PRE>\n");
+ strcat(outbuf, "<HTML><HEAD><TITLE>Gopher Menu</TITLE></HEAD>\n\
+ <BODY><H1>Gopher Menu</H1>\n<PRE>\n");
data->HTML_header_added = 1;
}
while ((pos != NULL) && (pos < inbuf + len)) {
case 502: /* Too Many Matches */
{
/* Print the message the server returns */
- sprintf(tmpbuf, "</PRE><HR><H2><i>%s</i></H2>\n<PRE>", result);
+ sprintf(tmpbuf, "</PRE><HR><H2>%s</H2>\n<PRE>", result);
strcat(outbuf, tmpbuf);
data->data_in = 1;
break;
/*
- * $Id: store.cc,v 1.92 1996/08/30 22:44:13 wessels Exp $
+ * $Id: store.cc,v 1.93 1996/08/30 23:23:35 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
if ((int) (strlen(msg) + strlen(mime_hdr) + 50) < 2000) {
sprintf(abort_msg, "HTTP/1.0 400 Cache Detected Error\r\n%s\r\n\r\n%s", mime_hdr, msg);
} else {
- debug(20, 0, "storeAbort: WARNING: Must increase msg length!");
+ debug(20, 0, "storeAbort: WARNING: Must increase msg length!\n");
}
storeAppend(e, abort_msg, strlen(abort_msg));
safe_free(mem->e_abort_msg);
start = getCurrentTime();
sprintf(tmp_filename, "%s/log_clean", swappath(0));
if ((fp = fopen(tmp_filename, "a+")) == NULL) {
- debug(20, 0, "storeWriteCleanLog: %s: %s", tmp_filename, xstrerror());
+ debug(20, 0, "storeWriteCleanLog: %s: %s\n", tmp_filename, xstrerror());
return 0;
}
for (e = storeGetFirst(); e; e = storeGetNext()) {
e->object_len,
e->url);
if (x < 0) {
- debug(20, 0, "storeWriteCleanLog: %s: %s", tmp_filename, xstrerror());
+ debug(20, 0, "storeWriteCleanLog: %s: %s\n", tmp_filename, xstrerror());
debug(20, 0, "storeWriteCleanLog: Current swap logfile not replaced.\n");
fclose(fp);
safeunlink(tmp_filename, 0);
}
}
if (fclose(fp) < 0) {
- debug(20, 0, "storeWriteCleanLog: %s: %s", tmp_filename, xstrerror());
+ debug(20, 0, "storeWriteCleanLog: %s: %s\n", tmp_filename, xstrerror());
debug(20, 0, "storeWriteCleanLog: Current swap logfile not replaced.\n");
safeunlink(tmp_filename, 0);
return 0;
/*
- * $Id: tools.cc,v 1.50 1996/08/30 22:44:15 wessels Exp $
+ * $Id: tools.cc,v 1.51 1996/08/30 23:23:36 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
struct rlimit rl;
#if defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
- debug(21, 0, "setrlimit: RLIMIT_NOFILE: %s", xstrerror());
+ debug(21, 0, "setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
} else {
rl.rlim_cur = FD_SETSIZE;
if (rl.rlim_cur > rl.rlim_max)
}
#elif defined(RLIMIT_OFILE)
if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
- debug(21, 0, "setrlimit: RLIMIT_NOFILE: %s", xstrerror());
+ debug(21, 0, "setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
} else {
rl.rlim_cur = FD_SETSIZE;
if (rl.rlim_cur > rl.rlim_max)
}
#endif
#else /* HAVE_SETRLIMIT */
- debug(21, 1, "setMaxFD: Cannot increase: setrlimit() not supported on this system");
+ debug(21, 1, "setMaxFD: Cannot increase: setrlimit() not supported on this system\n");
#endif /* HAVE_SETRLIMIT */
#if HAVE_SETRLIMIT && defined(RLIMIT_DATA)
if (getrlimit(RLIMIT_DATA, &rl) < 0) {
- debug(21, 0, "getrlimit: RLIMIT_DATA: %s", xstrerror());
+ debug(21, 0, "getrlimit: RLIMIT_DATA: %s\n", xstrerror());
} else {
rl.rlim_cur = rl.rlim_max; /* set it to the max */
if (setrlimit(RLIMIT_DATA, &rl) < 0) {
/*
- * $Id: url.cc,v 1.30 1996/08/27 17:55:34 wessels Exp $
+ * $Id: url.cc,v 1.31 1996/08/30 23:23:36 wessels Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
return 1;
return 0;
}
+
+int urlCheckRequest(r)
+ request_t *r;
+{
+ int rc = 0;
+ switch (r->protocol) {
+ case PROTO_HTTP:
+ case PROTO_CACHEOBJ:
+ rc = 1;
+ break;
+ case PROTO_FTP:
+ case PROTO_GOPHER:
+ case PROTO_WAIS:
+ if (r->method == METHOD_GET)
+ rc = 1;
+ break;
+ default:
+ break;
+ }
+ return rc;
+}