You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Sven Geisler <sg...@aeccom.com> on 2003/10/13 17:55:24 UTC
can't get form data for multipart/form-data from Opera 7.20
Hi,
I use forms with encoding type multipart/form-data.
This is ok for MSIE, Mozilla/NS and Safari.
I yust installed Opera 7.20 for W2K. I didn't get any parameter with
$apr->param.
I checked the stream. I guess, the issue is Content-Type from HTTP
header. Opera added charset. I requested iso-8859-1 as charset for the
form. (<form enctype="multipart/form-data"
accept-charset="iso-8859-1"...>)
Opera 7.20 (W2K):
Content-Type: multipart/form-data; charset=iso-8859-1;
boundary=----------GbmKQe9nIqBYSFVQw8wHn0
DATA:
------------LsfypPzuFiBMi4WvsRDWCk
Content-Disposition: form-data; name="go"
47qtkSj_W_0hhWvNF2U41HmB
------------LsfypPzuFiBMi4WvsRDWCk
Content-Disposition: form-data; name="community"
47qtkSj_W_0hhWvNF2U41HmB
------------LsfypPzuFiBMi4WvsRDWCk
Content-Disposition: form-data; name="agentTZOffset"
-120
------------LsfypPzuFiBMi4WvsRDWCk
Content-Disposition: form-data; name="agentDST"
1
------------LsfypPzuFiBMi4WvsRDWCk
Content-Disposition: form-data; name="node"
47rfRK5Avndd2TtJSKdCLaoklCyAuZOAx9U
------------LsfypPzuFiBMi4WvsRDWCk--
MSIE 6.0SP1 (W2K):
Content-Type: multipart/form-data;
boundary=---------------------------7d3f2a10146
DATA:
-----------------------------7d32642210146
Content-Disposition: form-data; name="go"
lTC5J4d7oMmWrRBdNXQCg9oF
-----------------------------7d32642210146
Content-Disposition: form-data; name="community"
lTC5J4d7oMmWrRBdNXQCg9oF
-----------------------------7d32642210146
Content-Disposition: form-data; name="agentTZOffset"
-120
-----------------------------7d32642210146
Content-Disposition: form-data; name="agentDST"
1
-----------------------------7d32642210146
Content-Disposition: form-data; name="node"
lTBuOjU-WxFcfswsNoLdHoNRvfWYP7SZ9yo
-----------------------------7d32642210146--
Regards,
Sven.
--
Sven Geisler <sg...@aeccom.com>
AEC/communications GmbH
Re: can't get form data for multipart/form-data from Opera 7.20
Posted by Sven Geisler <sg...@aeccom.com>.
Am Mon, 2003-10-13 um 20.05 schrieb Joe Schaefer:
> Sven Geisler <sg...@aeccom.com> writes:
>
> [...]
>
> > I checked the stream. I guess, the issue is Content-Type from HTTP
> > header. Opera added charset. I requested iso-8859-1 as charset for the
> > form. (<form enctype="multipart/form-data"
> > accept-charset="iso-8859-1"...>)
> >
> >
> > Opera 7.20 (W2K):
> >
> > Content-Type: multipart/form-data; charset=iso-8859-1;
> > boundary=----------GbmKQe9nIqBYSFVQw8wHn0
> ^^^^^^^^^^^^^^^^^^^^^^
>
> >
> > DATA:
> > ------------LsfypPzuFiBMi4WvsRDWCk
> ^^^^^^^^^^^^^^^^^^^^^^
Sorry, my fault. I provide two different request. But you got what I was
showing.
Regards,
Sven.
>
> Err, something is really wrong here. Do the boundary strings
> really fail to match up, or were these snippets from two different
> requests?
>
> 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 Geisler <sg...@aeccom.com>
AEC/communications GmbH
Re: can't get form data for multipart/form-data from Opera 7.20
Posted by Sven Geisler <sg...@aeccom.com>.
Hi Joe,
I tested the current cvs checkout of apreq-1 with your patch.
It works. I get now the parameters from the form.
apache: 1.3.27
mod_perl: 1.27
Thx and Regards,
Sven.
Am Die, 2003-10-14 um 06.14 schrieb Joe Schaefer:
> Joe Schaefer <jo...@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))) {
--
Sven Geisler <sg...@aeccom.com>
AEC/communications GmbH
Re: can't get form data for multipart/form-data from Opera 7.20
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Joe Schaefer <jo...@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
Re: can't get form data for multipart/form-data from Opera 7.20
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Sven Geisler <sg...@aeccom.com> writes:
[...]
> I checked the stream. I guess, the issue is Content-Type from HTTP
> header. Opera added charset. I requested iso-8859-1 as charset for the
> form. (<form enctype="multipart/form-data"
> accept-charset="iso-8859-1"...>)
>
>
> Opera 7.20 (W2K):
>
> Content-Type: multipart/form-data; charset=iso-8859-1;
> boundary=----------GbmKQe9nIqBYSFVQw8wHn0
^^^^^^^^^^^^^^^^^^^^^^
>
> DATA:
> ------------LsfypPzuFiBMi4WvsRDWCk
^^^^^^^^^^^^^^^^^^^^^^
Err, something is really wrong here. Do the boundary strings
really fail to match up, or were these snippets from two different
requests?
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.
--
Joe Schaefer