httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Wed, 06 Feb 2002 16:19:03 GMT
trawick     02/02/06 08:19:03

  Modified:    server   protocol.c
  Log:
  don't try to place a header field in error-notes if ap_rgetline()
  returned something like APR_EOF, since len is not set in this
  case and we can go off the end of storage
  
  make sure we set r->status to something when we bail out due
  to an error; otherwise, the request goes forward with meaningless
  headers
  
  Revision  Changes    Path
  1.80      +3 -1      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- protocol.c	6 Feb 2002 02:29:54 -0000	1.79
  +++ protocol.c	6 Feb 2002 16:19:03 -0000	1.80
  @@ -691,7 +691,8 @@
            * finding the end-of-line.  This is only going to happen if it 
            * exceeds the configured limit for a field size.
            */
  -        if (rv == APR_ENOSPC || len > r->server->limit_req_fieldsize) {
  +        if (rv == APR_ENOSPC ||
  +            (rv == APR_SUCCESS && len > r->server->limit_req_fieldsize))
{
               r->status = HTTP_BAD_REQUEST;
               apr_table_setn(r->notes, "error-notes",
                   apr_pstrcat(r->pool,
  @@ -704,6 +705,7 @@
           }
   
           if (rv != APR_SUCCESS) {
  +            r->status = HTTP_BAD_REQUEST;
               ap_log_rerror(APLOG_MARK, APLOG_NOTICE, rv, r, "get_mime_headers() failed");
               return;
           }
  
  
  

Mime
View raw message