httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Tue, 06 Feb 2001 22:49:47 GMT
rbb         01/02/06 14:49:47

  Modified:    .        CHANGES
               modules/http http_protocol.c
  Log:
  We have a poor abstraction in the protocol.  This is a temporary
  hack to fix the bug, but it will need to be fixed for real.  If
  we find an error while sending out a custom error response, we back
  up to the first non-OK request and send the data.  Then, when we send
  the EOS from finalize_request_protocol, we go to the last request,
  to ensure that we aren't sending an EOS to a request that has already
  received one.  Because the data is sent on a different request than
  the EOS, the error text never gets sent down the filter stack.  This
  fixes the problem by finding the last request, and sending the data
  with that request.
  PR:	7165
  
  Revision  Changes    Path
  1.77      +11 -0     httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -d -b -w -u -r1.76 -r1.77
  --- CHANGES	2001/02/06 20:41:03	1.76
  +++ CHANGES	2001/02/06 22:49:44	1.77
  @@ -1,5 +1,16 @@
   Changes with Apache 2.0b1
   
  +  *) We have a poor abstraction in the protocol.  This is a temporary
  +     hack to fix the bug, but it will need to be fixed for real.  If
  +     we find an error while sending out a custom error response, we back
  +     up to the first non-OK request and send the data.  Then, when we send
  +     the EOS from finalize_request_protocol, we go to the last request,
  +     to ensure that we aren't sending an EOS to a request that has already
  +     received one.  Because the data is sent on a different request than
  +     the EOS, the error text never gets sent down the filter stack.  This
  +     fixes the problem by finding the last request, and sending the data
  +     with that request.  [Ryan Bloom]
  +
     *) Make the server status page show the correct restart time, and
        thus the proper uptime. [Ryan Bloom]
   
  
  
  
  1.291     +15 -5     httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.290
  retrieving revision 1.291
  diff -u -d -b -w -u -r1.290 -r1.291
  --- http_protocol.c	2001/02/06 04:13:45	1.290
  +++ http_protocol.c	2001/02/06 22:49:46	1.291
  @@ -3589,6 +3589,16 @@
           const char *title = status_lines[idx];
           const char *h1;
   
  +        /* XXX This is a major hack that should be fixed cleanly.  The
  +         * problem is that we have the information we need in a previous
  +         * request, but the text of the page must be sent down the last
  +         * request_rec's filter stack.  rbb
  +         */
  +        request_rec *rlast = r;
  +        while (rlast->next) {
  +            rlast = rlast->next;
  +        }
  +
           /* Accept a status_line set by a module, but only if it begins
            * with the 3 digit status code
            */
  @@ -3605,22 +3615,22 @@
           /* folks decided they didn't want the error code in the H1 text */
           h1 = &title[4];
   
  -        ap_rvputs(r,
  +        ap_rvputs(rlast,
                     DOCTYPE_HTML_2_0
                     "<HTML><HEAD>\n<TITLE>", title,
                     "</TITLE>\n</HEAD><BODY>\n<H1>", h1, "</H1>\n",
                     NULL);
           
  -        ap_rputs(get_canned_error_string(status, r, location),r); 
  +        ap_rputs(get_canned_error_string(status, r, location),rlast); 
   
           if (recursive_error) {
  -            ap_rvputs(r, "<P>Additionally, a ",
  +            ap_rvputs(rlast, "<P>Additionally, a ",
                         status_lines[ap_index_of_response(recursive_error)],
                         "\nerror was encountered while trying to use an "
                         "ErrorDocument to handle the request.\n", NULL);
           }
  -        ap_rputs(ap_psignature("<HR>\n", r), r);
  -        ap_rputs("</BODY></HTML>\n", r);
  +        ap_rputs(ap_psignature("<HR>\n", r), rlast);
  +        ap_rputs("</BODY></HTML>\n", rlast);
       }
       ap_finalize_request_protocol(r);
   }
  
  
  

Mime
View raw message