You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ch...@apache.org on 2001/10/05 10:47:59 UTC

cvs commit: httpd-proxy/module-1.0 CHANGES mod_proxy.h proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c

chuck       01/10/05 01:47:59

  Modified:    module-1.0 CHANGES mod_proxy.h proxy_cache.c proxy_connect.c
                        proxy_ftp.c proxy_http.c proxy_util.c
  Log:
  remove Explain*; replace with ap_log_*
  
  Revision  Changes    Path
  1.5       +4 -0      httpd-proxy/module-1.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/CHANGES,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CHANGES	2001/09/25 04:17:54	1.4
  +++ CHANGES	2001/10/05 08:47:59	1.5
  @@ -1,3 +1,7 @@
  +mod_proxy changes for httpd 1.3.22-dev
  +
  +  *) remove Explain*; replace with ap_log_*
  +     [Chuck Murcko <ch...@topsail.org>]
   
   mod_proxy changes for httpd 1.3.21-dev
   
  
  
  
  1.4       +1 -3      httpd-proxy/module-1.0/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/mod_proxy.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_proxy.h	2001/06/08 10:14:20	1.3
  +++ mod_proxy.h	2001/10/05 08:47:59	1.4
  @@ -65,8 +65,7 @@
   
   /*
   
  -   Note that the Explain() stuff is not yet complete.
  -   Also note numerous FIXMEs and CHECKMEs which should be eliminated.
  +   Note numerous FIXMEs and CHECKMEs which should be eliminated.
   
      If TESTING is set, then garbage collection doesn't delete ... probably a good
      idea when hacking.
  @@ -74,7 +73,6 @@
    */
   
   #define TESTING	0
  -#undef EXPLAIN
   
   #include "httpd.h"
   #include "http_config.h"
  
  
  
  1.3       +28 -30    httpd-proxy/module-1.0/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/proxy_cache.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- proxy_cache.c	2001/06/08 07:39:06	1.2
  +++ proxy_cache.c	2001/10/05 08:47:59	1.3
  @@ -79,8 +79,6 @@
   #include "os.h"
   #endif
   
  -DEF_Explain
  -
   struct gc_ent {
       unsigned long int len;
       time_t expire;
  @@ -387,7 +385,7 @@
       for (i = 0; i < files->nelts; i++) {
   	fent = &((struct gc_ent *) files->elts)[i];
   	sprintf(filename, "%s%s", cachedir, fent->file);
  -	Explain3("GC Unlinking %s (expiry %ld, garbage_now %ld)", filename, (long)fent->expire, (long)garbage_now);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "GC Unlinking %s (expiry %ld, garbage_now %ld)", filename, (long)fent->expire, (long)garbage_now);
   #if TESTING
   	fprintf(stderr, "Would unlink %s\n", filename);
   #else
  @@ -430,7 +428,7 @@
   
       ap_snprintf(cachedir, sizeof(cachedir), "%s%s", cachebasedir, cachesubdir);
       filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
  -    Explain1("GC Examining directory %s", cachedir);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "GC Examining directory %s", cachedir);
       dir = opendir(cachedir);
       if (dir == NULL) {
   	ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  @@ -442,7 +440,7 @@
   	if (ent->d_name[0] == '.')
   	    continue;
   	sprintf(filename, "%s%s", cachedir, ent->d_name);
  -	Explain1("GC Examining file %s", filename);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "GC Examining file %s", filename);
   /* is it a temporary file? */
   	if (strncmp(ent->d_name, "tmp", 3) == 0) {
   /* then stat it to see how old it is; delete temporary files > 1 day old */
  @@ -453,7 +451,7 @@
   	    }
   	    else if (garbage_now != -1 && buf.st_atime < garbage_now - SEC_ONE_DAY &&
   		     buf.st_mtime < garbage_now - SEC_ONE_DAY) {
  -		Explain1("GC unlink %s", filename);
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "GC unlink %s", filename);
   		ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, r->server,
   			     "proxy gc: deleting orphaned cache file %s", filename);
   #if TESTING
  @@ -762,10 +760,10 @@
   	if (c->im) {
   	    if (strcmp(c->im, "*") &&
   	    (!etag || (strlen(etag) > 1 && 'W' == etag[0] && '/' == etag[1]) || !ap_proxy_liststr(c->im, etag, NULL))) {
  -		Explain0("If-Match specified, and it didn't - return 412");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-Match specified, and it didn't - return 412");
   	    }
   	    else {
  -		Explain0("If-Match specified, and it matched");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-Match specified, and it matched");
   		break;
   	    }
   	}
  @@ -779,10 +777,10 @@
   	 */
   	if (BAD_DATE != c->ius && BAD_DATE != c->lmod) {
   	    if (c->ius < c->lmod) {
  -		Explain0("If-Unmodified-Since specified, but it wasn't - return 412");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-Unmodified-Since specified, but it wasn't - return 412");
   	    }
   	    else {
  -		Explain0("If-Unmodified-Since specified, and it was unmodified");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-Unmodified-Since specified, and it was unmodified");
   		break;
   	    }
   	}
  @@ -797,7 +795,7 @@
   	else
   	    ap_pclosef(r->pool, ap_bfileno(cachefp, B_WR));
   
  -	Explain0("Use your cached copy, conditional precondition failed.");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Use your cached copy, conditional precondition failed.");
   	return HTTP_PRECONDITION_FAILED;
       }
   
  @@ -830,13 +828,13 @@
   	 */
   	if (c->inm) {
   	    if (!strcmp(c->inm, "*")) {
  -		Explain0("If-None-Match: * specified, return 304");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-None-Match: * specified, return 304");
   	    }
   	    else if (etag && ap_proxy_liststr(c->inm, etag, NULL)) {
  -		Explain0("If-None-Match: specified and we got a strong match - return 304");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-None-Match: specified and we got a strong match - return 304");
   	    }
   	    else if (wetag && ap_proxy_liststr(c->inm, wetag, NULL)) {
  -		Explain0("If-None-Match specified, and we got a weak match - return 304");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-None-Match specified, and we got a weak match - return 304");
   	    }
   	    else
   		break;
  @@ -851,7 +849,7 @@
   	 */
   	if (BAD_DATE != c->ims && BAD_DATE != c->lmod) {
   	    if (c->ims >= c->lmod) {
  -		Explain0("If-Modified-Since specified and not modified, try return 304");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "If-Modified-Since specified and not modified, try return 304");
   	    }
   	    else
   		break;
  @@ -868,13 +866,13 @@
   	else
   	    ap_pclosef(r->pool, ap_bfileno(cachefp, B_WR));
   
  -	Explain0("Use local copy, cached file hasn't changed");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Use local copy, cached file hasn't changed");
   	return HTTP_NOT_MODIFIED;
       }
   
   
       /* No conditional - just send it cousin! */
  -    Explain0("Local copy modified, send it");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Local copy modified, send it");
       r->status_line = strchr(c->resp_line, ' ') + 1;
       r->status = c->status;
   
  @@ -983,7 +981,7 @@
       else {
         c->filename = NULL;
         c->fp = NULL;
  -      Explain0("No CacheRoot, so no caching. Declining.");
  +      ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "No CacheRoot, so no caching. Declining.");
         return DECLINED;
       }
   
  @@ -1011,13 +1009,13 @@
             unlink(c->filename);
         c->fp = NULL;
         c->filename = NULL;
  -      Explain0("no-store forbids caching. Declining.");
  +      ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "no-store forbids caching. Declining.");
         return DECLINED;
       }
   
   /* if the cache file exists, open it */
       cachefp = NULL;
  -    Explain3("Request for %s, pragma_req=%s, ims=%ld", url,
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Request for %s, pragma_req=%s, ims=%ld", url,
   	     pragma_req, c->ims);
   /* find out about whether the request can access the cache */
       if (c->filename != NULL && r->method_number == M_GET &&
  @@ -1100,7 +1098,7 @@
   
   		/* headers do not match, so Vary failed */
   		c->fp = cachefp;
  -		Explain0("Vary header mismatch - object must be fetched from scratch. Declining.");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Vary header mismatch - object must be fetched from scratch. Declining.");
   		return DECLINED;
   	    }
   	}
  @@ -1202,7 +1200,7 @@
   
   	/* it's fresh darlings... */
   
  -	Explain0("Unexpired data available");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Unexpired data available");
   
   	/* set age header on response */
   	ap_table_set(c->hdrs, "Age",
  @@ -1270,7 +1268,7 @@
   
       c->fp = cachefp;
   
  -    Explain0("Local copy not present or expired. Declining.");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Local copy not present or expired. Declining.");
   
       return DECLINED;
   }
  @@ -1381,7 +1379,7 @@
       /* or we've been asked not to cache it above */
   	nocache) {
   
  -	Explain1("Response is not cacheable, unlinking %s", c->filename);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Response is not cacheable, unlinking %s", c->filename);
   
   	/* close the file */
   	if (c->fp != NULL) {
  @@ -1423,7 +1421,7 @@
   	date = now;
   	dates = ap_gm_timestr_822(r->pool, now);
   	ap_table_set(resp_hdrs, "Date", dates);
  -	Explain0("Added date header");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Added date header");
       }
   
   /* set response_time for HTTP/1.1 age calculations */
  @@ -1435,12 +1433,12 @@
       {
   	lmod = date;
   	lmods = dates;
  -	Explain0("Last modified is in the future, replacing with now");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Last modified is in the future, replacing with now");
       }
   /* if the response did not contain the header, then use the cached version */
       if (lmod == BAD_DATE && c->fp != NULL) {
   	lmod = c->lmod;
  -	Explain0("Reusing cached last modified");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Reusing cached last modified");
       }
   
   /* we now need to calculate the expire data for the object. */
  @@ -1456,7 +1454,7 @@
    *   else
    *      expire date = now + defaultexpire
    */
  -    Explain1("Expiry date is %ld", (long)expc);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Expiry date is %ld", (long)expc);
       if (expc == BAD_DATE) {
   	if (lmod != BAD_DATE) {
   	    double x = (double) (date - lmod) * conf->cache.lmfactor;
  @@ -1467,7 +1465,7 @@
   	}
   	else
   	    expc = now + conf->cache.defaultexpire;
  -	Explain1("Expiry date calculated %ld", (long)expc);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Expiry date calculated %ld", (long)expc);
       }
   
   /* get the content-length header */
  @@ -1574,7 +1572,7 @@
             break;
         }
   
  -      Explain1("Create temporary file %s", c->tempfile);
  +      ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Create temporary file %s", c->tempfile);
   
   /* create the new file */
         c->fp = ap_proxy_create_cachefile(r, c->tempfile);
  
  
  
  1.2       +10 -12    httpd-proxy/module-1.0/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/proxy_connect.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- proxy_connect.c	2001/06/07 19:50:58	1.1
  +++ proxy_connect.c	2001/10/05 08:47:59	1.2
  @@ -66,8 +66,6 @@
   #include <bstring.h>		/* for IRIX, FD_SET calls bzero() */
   #endif
   
  -DEF_Explain
  -
   /*  
    * This handles Netscape CONNECT method secure proxy requests.
    * A connection is opened to the specified host and data is
  @@ -167,10 +165,10 @@
   	return HTTP_FORBIDDEN;
   
       if (proxyhost) {
  -	Explain2("CONNECT to remote proxy %s on port %d", proxyhost, proxyport);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "CONNECT to remote proxy %s on port %d", proxyhost, proxyport);
       }
       else {
  -	Explain2("CONNECT to %s on port %d", host, port);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "CONNECT to %s on port %d", host, port);
       }
   
       server.sin_port = (proxyport ? htons(proxyport) : htons(port));
  @@ -224,7 +222,7 @@
   	 * have no alternative.  Error checking ignored.  Also, we force
   	 * a HTTP/1.0 request to keep things simple.
   	 */
  -	Explain0("Sending the CONNECT request to the remote proxy");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Sending the CONNECT request to the remote proxy");
   	ap_snprintf(buffer, sizeof(buffer), "CONNECT %s HTTP/1.0" CRLF,
   		    r->uri);
   	send(sock, buffer, strlen(buffer),0);
  @@ -233,7 +231,7 @@
   	send(sock, buffer, strlen(buffer),0);
       }
       else {
  -	Explain0("Returning 200 OK Status");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Returning 200 OK Status");
   	ap_rvputs(r, "HTTP/1.0 200 Connection established" CRLF, NULL);
   	ap_rvputs(r, "Proxy-agent: ", ap_get_server_version(), CRLF CRLF, NULL);
   	ap_bflush(r->connection->client);
  @@ -244,34 +242,34 @@
   	FD_SET(sock, &fds);
   	FD_SET(ap_bfileno(r->connection->client, B_WR), &fds);
   
  -	Explain0("Going to sleep (select)");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Going to sleep (select)");
   	i = ap_select((ap_bfileno(r->connection->client, B_WR) > sock ?
   		       ap_bfileno(r->connection->client, B_WR) + 1 :
   		       sock + 1), &fds, NULL, NULL, NULL);
  -	Explain1("Woke from select(), i=%d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Woke from select(), i=%d", i);
   
   	if (i) {
   	    if (FD_ISSET(sock, &fds)) {
  -		Explain0("sock was set");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "sock was set");
   		if ((nbytes = recv(sock, buffer, HUGE_STRING_LEN,0)) != 0) {
   		    if (nbytes == -1)
   			break;
   		    if (send(ap_bfileno(r->connection->client, B_WR), buffer, nbytes,0) == EOF)
   			break;
  -		    Explain1("Wrote %d bytes to client", nbytes);
  +		    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Wrote %d bytes to client", nbytes);
   		}
   		else
   		    break;
   	    }
   	    else if (FD_ISSET(ap_bfileno(r->connection->client, B_WR), &fds)) {
  -		Explain0("client->fd was set");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "client->fd was set");
   		if ((nbytes = recv(ap_bfileno(r->connection->client, B_WR), buffer,
   				   HUGE_STRING_LEN, 0)) != 0) {
   		    if (nbytes == -1)
   			break;
   		    if (send(sock, buffer, nbytes, 0) == EOF)
   			break;
  -		    Explain1("Wrote %d bytes to server", nbytes);
  +		    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Wrote %d bytes to server", nbytes);
   		}
   		else
   		    break;
  
  
  
  1.4       +38 -40    httpd-proxy/module-1.0/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/proxy_ftp.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- proxy_ftp.c	2001/06/08 08:53:29	1.3
  +++ proxy_ftp.c	2001/10/05 08:47:59	1.4
  @@ -65,8 +65,6 @@
   
   #define AUTODETECT_PWD
   
  -DEF_Explain
  -
   /*
    * Decodes a '%' escaped string, and returns the number of characters
    */
  @@ -541,7 +539,7 @@
                                    "Connect to remote machine blocked");
       }
   
  -    Explain2("FTP: connect to %s:%d", host, port);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: connect to %s:%d", host, port);
   
       parms = strchr(path, ';');
       if (parms != NULL)
  @@ -627,7 +625,7 @@
       /* 421 Service not available, closing control connection. */
       ap_hard_timeout("proxy ftp", r);
       i = ftp_getrc_msg(f, resp, sizeof resp);
  -    Explain1("FTP: returned status %d", i);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
       if (i == -1) {
   	ap_kill_timeout(r);
   	return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -655,11 +653,11 @@
   	return ap_proxyerror(r, HTTP_BAD_GATEWAY, resp);
       }
   
  -    Explain0("FTP: connected.");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: connected.");
   
       ap_bvputs(f, "USER ", user, CRLF, NULL);
       ap_bflush(f);			/* capture any errors */
  -    Explain1("FTP: USER %s", user);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: USER %s", user);
   
       /* possible results; 230, 331, 332, 421, 500, 501, 530 */
       /* states: 1 - error, 2 - success; 3 - send password, 4,5 fail */
  @@ -672,7 +670,7 @@
       /* 501 Syntax error in parameters or arguments. */
       /* 530 Not logged in. */
       i = ftp_getrc(f);
  -    Explain1("FTP: returned status %d", i);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
       if (i == -1) {
   	ap_kill_timeout(r);
   	return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -693,7 +691,7 @@
   	}
   	ap_bvputs(f, "PASS ", password, CRLF, NULL);
   	ap_bflush(f);
  -	Explain1("FTP: PASS %s", password);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PASS %s", password);
       /* possible results 202, 230, 332, 421, 500, 501, 503, 530 */
       /* 230 User logged in, proceed. */
       /* 332 Need account for login. */
  @@ -703,7 +701,7 @@
       /* 503 Bad sequence of commands. */
       /* 530 Not logged in. */
   	i = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
   	if (i == -1) {
   	    ap_kill_timeout(r);
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -738,7 +736,7 @@
   	len = decodeenc(path);
   	ap_bvputs(f, "CWD ", path, CRLF, NULL);
   	ap_bflush(f);
  -	Explain1("FTP: CWD %s", path);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: CWD %s", path);
   	*strp = '/';
   /* responses: 250, 421, 500, 501, 502, 530, 550 */
       /* 250 Requested file action okay, completed. */
  @@ -749,7 +747,7 @@
       /* 530 Not logged in. */
       /* 550 Requested action not taken. */
   	i = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
   	if (i == -1) {
   	    ap_kill_timeout(r);
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -784,7 +782,7 @@
   	   connection */
   	ap_bputs("TYPE I" CRLF, f);
   	ap_bflush(f);
  -	Explain0("FTP: TYPE I");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: TYPE I");
   /* responses: 200, 421, 500, 501, 504, 530 */
       /* 200 Command okay. */
       /* 421 Service not available, closing control connection. */
  @@ -793,7 +791,7 @@
       /* 504 Command not implemented for that parameter. */
       /* 530 Not logged in. */
   	i = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
   	if (i == -1) {
   	    ap_kill_timeout(r);
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -830,7 +828,7 @@
   
       ap_bputs("PASV" CRLF, f);
       ap_bflush(f);
  -    Explain0("FTP: PASV command issued");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PASV command issued");
   /* possible results: 227, 421, 500, 501, 502, 530 */
       /* 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2). */
       /* 421 Service not available, closing control connection. */
  @@ -864,14 +862,14 @@
   	else
   	    presult = atoi(pasv);
   
  -	Explain1("FTP: returned status %d", presult);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", presult);
   
   	if (presult == 227 && pstr != NULL && (sscanf(pstr,
   		 "%d,%d,%d,%d,%d,%d", &h3, &h2, &h1, &h0, &p1, &p0) == 6)) {
   	    /* pardon the parens, but it makes gcc happy */
   	    paddr = (((((h3 << 8) + h2) << 8) + h1) << 8) + h0;
   	    pport = (p1 << 8) + p0;
  -	    Explain5("FTP: contacting host %d.%d.%d.%d:%d",
  +	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: contacting host %d.%d.%d.%d:%d",
   		     h3, h2, h1, h0, pport);
   	    data_addr.sin_family = AF_INET;
   	    data_addr.sin_addr.s_addr = htonl(paddr);
  @@ -949,16 +947,16 @@
       else {
   	ap_bvputs(f, "SIZE ", path, CRLF, NULL);
   	ap_bflush(f);
  -	Explain1("FTP: SIZE %s", path);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: SIZE %s", path);
   	i = ftp_getrc_msg(f, resp, sizeof resp);
  -	Explain2("FTP: returned status %d with response %s", i, resp);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d with response %s", i, resp);
   	if (i != 500) {		/* Size command not recognized */
   	    if (i == 550) {	/* Not a regular file */
  -		Explain0("FTP: SIZE shows this is a directory");
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: SIZE shows this is a directory");
   		parms = "d";
   		ap_bvputs(f, "CWD ", path, CRLF, NULL);
   		ap_bflush(f);
  -		Explain1("FTP: CWD %s", path);
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: CWD %s", path);
   		i = ftp_getrc(f);
   		/* possible results: 250, 421, 500, 501, 502, 530, 550 */
   		/* 250 Requested file action okay, completed. */
  @@ -968,7 +966,7 @@
   		/* 502 Command not implemented. */
   		/* 530 Not logged in. */
   		/* 550 Requested action not taken. */
  -		Explain1("FTP: returned status %d", i);
  +		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
   		if (i == -1) {
   		    ap_kill_timeout(r);
   		    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -998,7 +996,7 @@
   #ifdef AUTODETECT_PWD
       ap_bvputs(f, "PWD", CRLF, NULL);
       ap_bflush(f);
  -    Explain0("FTP: PWD");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PWD");
   /* responses: 257, 500, 501, 502, 421, 550 */
       /* 257 "<directory-name>" <commentary> */
       /* 421 Service not available, closing control connection. */
  @@ -1007,7 +1005,7 @@
       /* 502 Command not implemented. */
       /* 550 Requested action not taken. */
       i = ftp_getrc_msg(f, resp, sizeof resp);
  -    Explain1("FTP: PWD returned status %d", i);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PWD returned status %d", i);
       if (i == -1 || i == 421) {
   	ap_kill_timeout(r);
   	return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -1028,11 +1026,11 @@
   	    ap_bvputs(f, "LIST ", path, CRLF, NULL);
   	else
   	    ap_bputs("LIST -lag" CRLF, f);
  -	Explain1("FTP: LIST %s", (len == 0 ? "" : path));
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: LIST %s", (len == 0 ? "" : path));
       }
       else {
   	ap_bvputs(f, "RETR ", path, CRLF, NULL);
  -	Explain1("FTP: RETR %s", path);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: RETR %s", path);
       }
       ap_bflush(f);
   /* RETR: 110, 125, 150, 226, 250, 421, 425, 426, 450, 451, 500, 501, 530, 550
  @@ -1052,18 +1050,18 @@
       /* 530 Not logged in. */
       /* 550 Requested action not taken. */
       rc = ftp_getrc(f);
  -    Explain1("FTP: returned status %d", rc);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", rc);
       if (rc == -1) {
   	ap_kill_timeout(r);
   	return ap_proxyerror(r, HTTP_BAD_GATEWAY,
   			     "Error reading from remote server");
       }
       if (rc == 550) {
  -	Explain0("FTP: RETR failed, trying LIST instead");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: RETR failed, trying LIST instead");
   	parms = "d";
   	ap_bvputs(f, "CWD ", path, CRLF, NULL);
   	ap_bflush(f);
  -	Explain1("FTP: CWD %s", path);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: CWD %s", path);
   	/* possible results: 250, 421, 500, 501, 502, 530, 550 */
   	/* 250 Requested file action okay, completed. */
   	/* 421 Service not available, closing control connection. */
  @@ -1073,7 +1071,7 @@
   	/* 530 Not logged in. */
   	/* 550 Requested action not taken. */
   	rc = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", rc);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", rc);
   	if (rc == -1) {
   	    ap_kill_timeout(r);
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -1091,7 +1089,7 @@
   #ifdef AUTODETECT_PWD
   	ap_bvputs(f, "PWD", CRLF, NULL);
   	ap_bflush(f);
  -	Explain0("FTP: PWD");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PWD");
   /* responses: 257, 500, 501, 502, 421, 550 */
   	/* 257 "<directory-name>" <commentary> */
   	/* 421 Service not available, closing control connection. */
  @@ -1100,7 +1098,7 @@
   	/* 502 Command not implemented. */
   	/* 550 Requested action not taken. */
   	i = ftp_getrc_msg(f, resp, sizeof resp);
  -	Explain1("FTP: PWD returned status %d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: PWD returned status %d", i);
   	if (i == -1 || i == 421) {
   	    ap_kill_timeout(r);
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
  @@ -1118,9 +1116,9 @@
   
   	ap_bputs("LIST -lag" CRLF, f);
   	ap_bflush(f);
  -	Explain0("FTP: LIST -lag");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: LIST -lag");
   	rc = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", rc);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", rc);
   	if (rc == -1)
   	    return ap_proxyerror(r, HTTP_BAD_GATEWAY,
   				 "Error reading from remote server");
  @@ -1150,7 +1148,7 @@
   #endif
   	if (r->content_type != NULL) {
   	    ap_table_setn(resp_hdrs, "Content-Type", r->content_type);
  -	    Explain1("FTP: Content-Type set to %s", r->content_type);
  +	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: Content-Type set to %s", r->content_type);
   	}
   	else {
   	    ap_table_setn(resp_hdrs, "Content-Type", ap_default_type(r));
  @@ -1158,11 +1156,11 @@
   	if (parms[0] != 'a' && size != NULL) {
   	    /* We "trust" the ftp server to really serve (size) bytes... */
   	    ap_table_set(resp_hdrs, "Content-Length", size);
  -	    Explain1("FTP: Content-Length set to %s", size);
  +	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: Content-Length set to %s", size);
   	}
       }
       if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
  -	Explain1("FTP: Content-Encoding set to %s", r->content_encoding);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: Content-Encoding set to %s", r->content_encoding);
   	ap_table_setn(resp_hdrs, "Content-Encoding", r->content_encoding);
       }
   
  @@ -1257,7 +1255,7 @@
   	ap_bflush(f);
   	if (!pasvmode)
   	    ap_bclose(data);
  -	Explain0("FTP: ABOR");
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: ABOR");
   /* responses: 225, 226, 421, 500, 501, 502 */
       /* 225 Data connection open; no transfer in progress. */
       /* 226 Closing data connection. */
  @@ -1266,7 +1264,7 @@
       /* 501 Syntax error in parameters or arguments. */
       /* 502 Command not implemented. */
   	i = ftp_getrc(f);
  -	Explain1("FTP: returned status %d", i);
  +	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: returned status %d", i);
       }
   
       ap_kill_timeout(r);
  @@ -1275,12 +1273,12 @@
   /* finish */
       ap_bputs("QUIT" CRLF, f);
       ap_bflush(f);
  -    Explain0("FTP: QUIT");
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: QUIT");
   /* responses: 221, 500 */
       /* 221 Service closing control connection. */
       /* 500 Syntax error, command unrecognized. */
       i = ftp_getrc(f);
  -    Explain1("FTP: QUIT: status %d", i);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "FTP: QUIT: status %d", i);
   
       if (pasvmode)
   	ap_bclose(data);
  
  
  
  1.4       +1 -1      httpd-proxy/module-1.0/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/proxy_http.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- proxy_http.c	2001/09/25 04:17:54	1.3
  +++ proxy_http.c	2001/10/05 08:47:59	1.4
  @@ -534,7 +534,7 @@
                                ap_get_server_name(r), NULL));
       /* The Content-Type of this response is the upstream one. */
       r->content_type = ap_table_get (r->headers_out, "Content-Type");
  -    Explain1("Content-Type: %s", r->content_type);
  +    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "Content-Type: %s", r->content_type);
       /* finally output the headers to the client */
       ap_send_http_header(r);
   
  
  
  
  1.7       +1 -3      httpd-proxy/module-1.0/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-1.0/proxy_util.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- proxy_util.c	2001/09/25 04:17:54	1.6
  +++ proxy_util.c	2001/10/05 08:47:59	1.7
  @@ -1369,10 +1369,8 @@
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
   	                  "proxy: error opening cache file %s",
   	                  filename);
  -#ifdef EXPLAIN
   	else
  -	    Explain1("File %s not found", filename);
  -#endif
  +	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server, "File %s not found", filename);
   
       }
       return cachefp;