httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r531273 - in /httpd/apreq/branches/1.x: Changes c/apache_multipart_buffer.c
Date Sun, 22 Apr 2007 21:00:26 GMT
Author: joes
Date: Sun Apr 22 14:00:25 2007
New Revision: 531273

URL: http://svn.apache.org/viewvc?view=rev&rev=531273
Log:
have fill_buffer() completely fill the multipart_buffer.  This
bug is tickled by the FireFox 2.0 when doing ssl uploads:

  https://bugzilla.mozilla.org/show_bug.cgi?id=356470
  https://bugzilla.mozilla.org/show_bug.cgi?id=369414

Modified:
    httpd/apreq/branches/1.x/Changes
    httpd/apreq/branches/1.x/c/apache_multipart_buffer.c

Modified: httpd/apreq/branches/1.x/Changes
URL: http://svn.apache.org/viewvc/httpd/apreq/branches/1.x/Changes?view=diff&rev=531273&r1=531272&r2=531273
==============================================================================
--- httpd/apreq/branches/1.x/Changes (original)
+++ httpd/apreq/branches/1.x/Changes Sun Apr 22 14:00:25 2007
@@ -4,10 +4,15 @@
 
 =item 1.34 
 
+have fill_buffer() completely fill the multipart_buffer.  This
+bug is tickled by the FireFox 2.0 when doing ssl uploads:
+
+  https://bugzilla.mozilla.org/show_bug.cgi?id=356470
+  https://bugzilla.mozilla.org/show_bug.cgi?id=369414
+
 move the mod_perl version detection to the top of Makefile.PL, so
 Apache-Test and other things won't fool around with %INC and confuse
 the detection code. [Stas]
-
 
 
 =item 1.33 - December 15, 2004

Modified: httpd/apreq/branches/1.x/c/apache_multipart_buffer.c
URL: http://svn.apache.org/viewvc/httpd/apreq/branches/1.x/c/apache_multipart_buffer.c?view=diff&rev=531273&r1=531272&r2=531273
==============================================================================
--- httpd/apreq/branches/1.x/c/apache_multipart_buffer.c (original)
+++ httpd/apreq/branches/1.x/c/apache_multipart_buffer.c Sun Apr 22 14:00:25 2007
@@ -52,7 +52,7 @@
 */
 int fill_buffer(multipart_buffer *self)
 {
-    int bytes_to_read, actual_read = 0;
+    int bytes_to_read, actual_read = 0, total_read = 0;
 
     /* shift the existing data if necessary */
     if(self->bytes_in_buffer > 0 && self->buf_begin != self->buffer)
@@ -70,18 +70,24 @@
     }
 
     /* read the required number of bytes */
-    if(bytes_to_read > 0) {
+    while(bytes_to_read > 0) {
 	char *buf = self->buffer + self->bytes_in_buffer;
 	ap_hard_timeout("[libapreq] multipart_buffer.c:fill_buffer", self->r);
 	actual_read = ap_get_client_block(self->r, buf, bytes_to_read);
 	ap_kill_timeout(self->r);
 
 	/* update the buffer length */
-	if(actual_read > 0)
-	  self->bytes_in_buffer += actual_read;
+	if(actual_read > 0) {
+            self->bytes_in_buffer += actual_read;
+            bytes_to_read -= actual_read;
+            total_read += actual_read;
+        }
+        else {
+            break;
+        }
     }
 
-    return actual_read;
+    return total_read;
 }
 
 /*



Mime
View raw message