From: Daniel Gruno Date: Sun, 12 Aug 2012 07:45:55 +0000 (+0000) Subject: core: X-Git-Tag: 2.5.0-alpha~6442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdc02db4a3406b33616a7f9e9e9c7876c7089342;p=apache core: Be less strict when checking whether Content-Type is set to "application/x-www-form-urlencoded" when parsing POST data, or we risk losing data with an appended charset. PR 53698 Reported by: Petter Berntsen < sluggr gmail.com > git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1372054 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 09061c2e36..3aa14a9205 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) core: Be less strict when checking whether Content-Type is set to + "application/x-www-form-urlencoded" when parsing POST data, + or we risk losing data with an appended charset. PR 53698 + [Petter Berntsen ] + *) Windows: Fix SSL failures on windows with AcceptFilter https none. PR: 52476. [Jeff Trawick] diff --git a/server/util.c b/server/util.c index fd9425c789..b1eb35ce60 100644 --- a/server/util.c +++ b/server/util.c @@ -2406,7 +2406,7 @@ AP_DECLARE(int) ap_parse_form_data(request_rec *r, ap_filter_t *f, /* sanity check - we only support forms for now */ ct = apr_table_get(r->headers_in, "Content-Type"); - if (!ct || strcmp("application/x-www-form-urlencoded", ct)) { + if (!ct || ap_strcmp_match(ct, "application/x-www-form-urlencoded*")) { return ap_discard_request_body(r); }