httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T.J. Mather" <tjmat...@maxmind.com>
Subject Microsoft Bug Work around
Date Mon, 21 Oct 2002 01:08:39 GMT
Hi,

I have included a patch that is a work around for (what I think may be) 
a bug in Microsoft's XMLHTTP method.  Basically Microsoft's code does not
set a Content-type when sending a POST request, so as a workaround,
I have set it to DEFAULT_ENCTYPE when Content-type is not set.

Thanks,
TJ

--- libapreq-1.0/c/apache_request.c     Mon Feb 18 11:48:27 2002
+++ libapreq-1.0_new/c/apache_request.c Sun Oct 20 21:05:26 2002
@@ -278,6 +278,11 @@

     if (r->method_number == M_POST) {
        const char *ct = ap_table_get(r->headers_in, "Content-type");
+       /* workaround for bug where Microsoft.XMLHTTP doesn't set a Content-type */
+       if (ct == NULL) {
+           ap_table_set(r->headers_in, "Content-type", DEFAULT_ENCTYPE);
+           ct = DEFAULT_ENCTYPE;
+       }
        if (ct && strncaseEQ(ct, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH)) {
            result = ApacheRequest_parse_urlencoded(req);
        }


Mime
View raw message