httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: can't get form data for multipart/form-data from Opera 7.20
Date Tue, 14 Oct 2003 04:14:16 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

[...]

> Certainly that "charset=iso-8859-1" attribute in the Content-Type
> header is going to cause problems for both apreq-1 and apreq-2, 
> so we need to fix that anyway.

Sven, please see if the following patch to httpd-apreq cvs
fixes it:

Index: c/apache_request.c
===================================================================
RCS file: /home/cvs/httpd-apreq/c/apache_request.c,v
retrieving revision 1.27
diff -u -r1.27 apache_request.c
--- c/apache_request.c	26 Sep 2003 09:44:02 -0000	1.27
+++ c/apache_request.c	14 Oct 2003 04:12:46 -0000
@@ -537,7 +537,17 @@
 	return HTTP_REQUEST_ENTITY_TOO_LARGE;
     }
 
-    (void)ap_getword(r->pool, &ct, '=');
+    do {
+        int blen;
+        boundary = ap_getword(r->pool, &ct, '=');
+        if (boundary == NULL)
+            return DECLINED;
+        blen = strlen(boundary);
+        if (blen == 0 || blen < strlen("boundary"))
+            return DECLINED;
+        boundary += blen - strlen("boundary");
+    } while (strcasecmp(boundary,"boundary") != 0);
+
     boundary = ap_getword_conf(r->pool, &ct);
 
     if (!(mbuff = multipart_buffer_new(boundary, length, r))) {

-- 
Joe Schaefer


Mime
View raw message