httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: cvs commit: apache/src http_protocol.c
Date Tue, 02 Apr 1996 15:21:34 GMT
> 
> Ben>   diff -C3 -r1.15 -r1.16
> Ben>   *** http_protocol.c	1996/04/02 12:02:16	1.15
> Ben>   --- http_protocol.c	1996/04/02 14:10:25	1.16
> Ben>   ***************
> Ben>   *** 720,727 ****
>     	
> Ben>             while(n && !r->connection->aborted) {
> Ben>                 w=bwrite(c->client, &buf[o], n);
> Ben>   ! 	    if (w > 0)
> Ben>   ! 	        reset_timeout(r); /* reset timeout after successfule write */
> Ben>                 n-=w;
> Ben>                 o+=w;
> Ben>             }
> Ben>   --- 720,728 ----
>     	
> Ben>             while(n && !r->connection->aborted) {
> Ben>                 w=bwrite(c->client, &buf[o], n);
> Ben>   ! 	    if(w <= 0)
> Ben>   ! 		break;
> Ben>   ! 	    reset_timeout(r); /* reset timeout after successfule write */
> Ben>                 n-=w;
> Ben>                 o+=w;
> Ben>             }
>   
> Here is the smae patch for mod_proxy.c, which has the same code
> segment:
> 
> ------------------------------------------------------------
> 
> # diff -C3 -p mod_proxy.c~ mod_proxy.c
> *** mod_proxy.c~        Mon Apr  1 08:00:09 1996
> --- mod_proxy.c Tue Apr  2 09:10:16 1996
> *************** send_fb(BUFF *f, request_rec *r, BUFF *f
> *** 844,851 ****
>   
>           while(n && !r->connection->aborted) {
>               w = bwrite(con->client, &buf[o], n);
> !           if (w > 0)
> !               reset_timeout(r); /* reset timeout after successfule write */
>               n-=w;
>               o+=w;
>           }
> --- 844,852 ----
>   
>           while(n && !r->connection->aborted) {
>               w = bwrite(con->client, &buf[o], n);
> !           if (w <= 0)
> !               break;
> !           reset_timeout(r); /* reset timeout after successfule write */
>               n-=w;
>               o+=w;
>           }
> 
> ------------------------------------------------------------

OK, done.

I notice quite a few other bwrites with no error checking at all in
mod_proxy.c.

Cheers,

Ben.

> 
> -JimC
> -- 
> James H. Cloos, Jr.	<URL:http://www.jhcloos.com/~cloos/>
> cloos@jhcloos.com	Work: cloos@io.com
> LPF,Usenix,SAGE,ISOC

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.

Mime
View raw message