You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/05/12 02:45:02 UTC

[PATCH] PR#502: timeout problems (second try)

If a soft_timeout occurs after keepalive is set, then the main child
loop would try to read another request even though the connection
has been aborted.  This might just fix PR#502, though I can't reproduce
the reported problem.

.....Roy

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.143
diff -c -r1.143 http_main.c
*** http_main.c	1997/05/08 07:57:44	1.143
--- http_main.c	1997/05/12 00:41:07
***************
*** 1861,1868 ****
           * until no requests are left or we decide to close.
           */
  
!         for (;;) {
!             r = read_request(current_conn);
  
  	    /* ok we've read the request... it's a little too late
  	     * to do a graceful restart, so ignore them for now.
--- 1861,1867 ----
           * until no requests are left or we decide to close.
           */
  
!         while ((r = read_request(current_conn)) != NULL) {
  
  	    /* ok we've read the request... it's a little too late
  	     * to do a graceful restart, so ignore them for now.
***************
*** 1871,1881 ****
  
              (void)update_child_status(child_num, SERVER_BUSY_WRITE, r);
  
!             if (r) process_request(r); /* else premature EOF --- ignore */
  #if defined(STATUS)
!             if (r) increment_counts(child_num, r);
  #endif
!             if (!r || !current_conn->keepalive)
                  break;
  
              destroy_pool(r->pool);
--- 1870,1880 ----
  
              (void)update_child_status(child_num, SERVER_BUSY_WRITE, r);
  
!             process_request(r);
  #if defined(STATUS)
!             increment_counts(child_num, r);
  #endif
!             if (!current_conn->keepalive || current_conn->aborted)
                  break;
  
              destroy_pool(r->pool);
***************
*** 2468,2474 ****
  	r = read_request (conn);
  	if (r) process_request (r); /* else premature EOF (ignore) */
  
!         while (r && conn->keepalive) {
  	    destroy_pool(r->pool);
              r = read_request (conn);
              if (r) process_request (r);
--- 2467,2473 ----
  	r = read_request (conn);
  	if (r) process_request (r); /* else premature EOF (ignore) */
  
!         while (r && conn->keepalive && !conn->aborted) {
  	    destroy_pool(r->pool);
              r = read_request (conn);
              if (r) process_request (r);

Re: [PATCH] PR#502: timeout problems (second try)

Posted by Chuck Murcko <ch...@topsail.org>.
+1 here, also.

Dean Gaudet wrote:
> 
> +1
> 
> On Sun, 11 May 1997, Roy T. Fielding wrote:
> 
> > If a soft_timeout occurs after keepalive is set, then the main child
> > loop would try to read another request even though the connection
> > has been aborted.  This might just fix PR#502, though I can't reproduce
> > the reported problem.
> >
> > .....Roy

-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org

Re: [PATCH] PR#502: timeout problems (second try)

Posted by Dean Gaudet <dg...@arctic.org>.
+1

On Sun, 11 May 1997, Roy T. Fielding wrote:

> If a soft_timeout occurs after keepalive is set, then the main child
> loop would try to read another request even though the connection
> has been aborted.  This might just fix PR#502, though I can't reproduce
> the reported problem.
> 
> .....Roy