httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: [PATCH] PR#352 - add IP address to connect() error messages
Date Sun, 17 Aug 1997 18:11:54 GMT
[Sun Aug 17 12:08:57 1997] connect: 127.0.0.1: Connection refused
[Sun Aug 17 12:08:57 1997] connect: 10.0.0.1: No route to host

It doesn't work correctly using ProxyRemote because
r->connection->remote_ip isn't always the address we are trying to
connect.  Try:

        proxy_log_uerror("connect", inet_ntoa(addr->sin_addr), NULL,
r->server);

instead.

On Sun, 17 Aug 1997, Rodent of Unusual Size wrote:

>     I don't run the proxy at all.  Can someone who does vet this for me
>     and see if it addresses the problem in PR#352?  The intent is cause
>     the error_log line to go from
> 
> [Thu Apr 10 10:08:00 1997] connect: No route to host
> 
>     to
> 
> [Thu Apr 10 10:08:00 1997] connect: No route to host: 198.45.36.122
> 
>     and likewise for ECONNREFUSED (actually, for any errors at this
>     point).
> 
>     #ken    :-)}
> 
> Index: proxy_util.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_util.c,v
> retrieving revision 1.22
> diff -u -r1.22 proxy_util.c
> --- proxy_util.c	1997/07/27 03:13:34	1.22
> +++ proxy_util.c	1997/08/17 17:37:38
> @@ -1168,9 +1168,10 @@
>              errno = WSAGetLastError() - WSABASEERR;
>  #endif /* WIN32 */
>      } while (i == -1 && errno == EINTR);
> -    if (i == -1) proxy_log_uerror("connect", NULL, NULL, r->server);
> +    if (i == -1) {
> +	proxy_log_uerror("connect", r->connection->remote_ip, NULL, r->server);
> +    }
>      kill_timeout(r);
>  
>      return i;
>  }
> -
> 


Mime
View raw message