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/server protocol.c
Date Tue, 07 Aug 2001 16:40:25 GMT
rbb         01/08/07 09:40:25

  Modified:    server   protocol.c
  Log:
  Back out a patch that wasn't ready for inclusion.  Thanks to OtherBill
  for pointing out that this was committed when it shouldn't have been.
  
  Revision  Changes    Path
  1.38      +3 -19     httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- protocol.c	2001/08/07 16:19:03	1.37
  +++ protocol.c	2001/08/07 16:40:25	1.38
  @@ -1135,30 +1135,14 @@
   
   AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
   {
  -    char *buf;
  -    int   buf_size = 4096; /* start with a 4k buffer */
  +    char buf[4096];
       apr_size_t written;
   
       if (r->connection->aborted)
           return -1;
   
  -    buf = apr_palloc(r->pool, buf_size);
  -    while (1) {
  -	written = apr_vsnprintf(buf, buf_size, fmt, va);
  -
  -	/*
  -	 * Per the apr_vsnprintf comments, in no event does apr_snprintf return a negative number.
  -	 * Therefore, it's not possible to distinguish between an output which was truncated,
  -	 * and an output which exactly filled the buffer.
  -	 */
  -	if (written == buf_size) {
  -	    buf_size *= 2;
  -	    buf = apr_palloc(r->pool, buf_size); /* want realloc */
  -	}
  -	else {
  -	    break;
  -	}
  -    }
  +    /* ### fix this mechanism to allow more than 4K of output */
  +    written = apr_vsnprintf(buf, sizeof(buf), fmt, va);
   
       if (buffer_output(r, buf, written) != APR_SUCCESS)
           return -1;
  
  
  

Mime
View raw message