Article delegate-en/3893 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Handling 404 errors
07 Nov 2007 11:19:29 GMT "Matthias Waldorf \(Zoom\)" <pgmhqbdyi-mnhltat5ynjr.ml@ml.delegate.org>


Dear Yutaka,

wow, this was really fast! However, I cannot test your patch until a
binary for windows is released as I cannot compile delegate myself. I
will give you feedback when the binary is available!

Best regards, Matthias 

> -----Original Message-----
> From: Yutaka Sato [mailto:feedback@delegate.org] 
> Sent: Wednesday, November 07, 2007 9:34 AM
> To: feedback@delegate.org
> Cc: Matthias Waldorf (Zoom); feedback@delegate.org
> Subject: Re: [DeleGate-En:3908] Handling 404 errors
> 
> Hi,
> 
> In message 
> <_A3891@delegate-en.ML_> on 
> 11/07/07(08:38:28) you "Matthias Waldorf \(Zoom\)" 
> <pgmhqbdyi-mnhltat5ynjr.ml@ml.delegate.org> wrote:
>  |I'm using delegate 9.7.6 under windows as origin server for 
> HTTP and try  |to setup some special handling for 404 errors. 
> I would like to forward  |all requests where no file exists 
> to a second server like this:
>  |
>  |SERVER=http
>  |
>  |MOUNT="/* file:///d:/www/*"
>  |MOUNT="/* http://localhost:8001/* onerror={404}"
>  |
>  |However, this seem not to work. Is there any other 
> possibility to do  |this?
> 
> You are right, it should work as you expect.  I fixed it as 
> the enclosed patch and uploaded the fixed version as 
> dg9_7_7-pre1.zip to the directory of DeleGate on my FTP server.
> 
> Cheers,
> Yutaka
> --
>   9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
>  ( ~ )  National Institute of Advanced Industrial Science and 
> Technology
> _<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
> Do the more with the less -- B. Fuller
> 
> *** ../delegate9.7.6/src/http.c	Fri Oct 26 06:42:30 2007
> --- http.c	Wed Nov  7 16:45:22 2007
> ***************
> *** 4529,4534 ****
> --- 4529,4538 ----
>   	if( 400 <= RX_code ){
>   		HTTP_setRetry(Conn,req,RX_code);
>   	}
> + 	if( Conn->sv_retry & SV_RETRY_DONE ){
> + 		/* 9.7.7 the result of a retrial */
> + 		Verbose("-- RETRY[%X] >>> 
> (%d)\n",Conn->sv_retry,RX_code);
> + 	}else
>   	if( Conn->sv_retry != 0 ){
>   		sv1log("ERROR (%d) to be RETRYed\n",RX_code);
>   		RX_tcp = NULLFP();
> ***************
> *** 9274,9279 ****
> --- 9278,9291 ----
>   	if( Conn->sv_retry == SV_RETRY_DO ){
>   		sv1log("RETRYing with [%s]...\n",REQ_URL);
>   		sprintf(REQ,"%s %s 
> HTTP/%s\r\n",REQ_METHOD,REQ_URL,REQ_VER);
> + 		if( ToMyself || IAM_GATEWAY ){
> + 			/* 9.7.7 error in origin/gateway-server */
> + 			Verbose("-- ToMe:%d ImGw:%d fm=%d\n",
> + 				ToMyself,IAM_GATEWAY,Conn->from_myself);
> + 			ToMyself = 0;
> + 			IAM_GATEWAY = 0;
> + 		}
> + 		Conn->from_myself = 1;
>   		if( rewriteRequest(Conn,QX,fc,tc) < 0 )
>   			goto EXIT;
>   		Conn->sv_retry |= SV_RETRY_DONE;
> 
> 

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V