httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1051468 - in /httpd/httpd/trunk: CHANGES modules/ssl/ssl_engine_io.c
Date Tue, 21 Dec 2010 11:43:42 GMT
Author: rpluem
Date: Tue Dec 21 11:43:42 2010
New Revision: 1051468

URL: http://svn.apache.org/viewvc?rev=1051468&view=rev
Log:
* Do not drop contents of incomplete lines, but safe them for the next
  round of reading.

PR: 50481

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1051468&r1=1051467&r2=1051468&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Dec 21 11:43:42 2010
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.11
 
+  *) mod_ssl: Correctly read full lines in input filter when the line is
+     incomplete during first read. PR 50481. [Ruediger Pluem]
+
   *) mod_authz_core: Add AuthzSendForbiddenOnFailure directive to allow
      sending '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if authorization
      fails for an authenticated user. PR 40721. [Stefan Fritsch]

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=1051468&r1=1051467&r2=1051468&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Tue Dec 21 11:43:42 2010
@@ -756,6 +756,10 @@ static apr_status_t ssl_io_input_getline
         status = ssl_io_input_read(inctx, buf + offset, &tmplen);
 
         if (status != APR_SUCCESS) {
+            if (APR_STATUS_IS_EAGAIN(status) && (*len > 0)) {
+                /* Safe the part of the line we already got */
+                char_buffer_write(&inctx->cbuf, buf, *len);
+            }
             return status;
         }
 
@@ -782,6 +786,10 @@ static apr_status_t ssl_io_input_getline
 
         *len = bytes;
     }
+    else {
+        /* Safe the part of the line we already got */
+        char_buffer_write(&inctx->cbuf, buf, *len);
+    }
 
     return APR_SUCCESS;
 }



Mime
View raw message