From d4d7006bbbc04b0d99f59de48ae2cb7cf72bc51b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 23 Jan 2009 23:58:44 +0000 Subject: [PATCH] fixing Mantis 1443 --- ChangeLog | 4 ++++ src/daemon/postprocessor.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6e5555c..11358c0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jan 23 16:57:21 MST 2009 + Support charset specification (ignore) after content-type + when post-processing HTTP POST requests (Mantis #1443). -CG/SN + Fri Dec 26 23:08:04 MST 2008 Fixed broken check for identical connection address. -CG Making cookie parser more RFC2109 compliant (handle diff --git a/src/daemon/postprocessor.c b/src/daemon/postprocessor.c index 46c68518..3d25e4bd 100644 --- a/src/daemon/postprocessor.c +++ b/src/daemon/postprocessor.c @@ -263,7 +263,8 @@ MHD_create_post_processor (struct MHD_Connection *connection, if (encoding == NULL) return NULL; boundary = NULL; - if (0 != strcasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, encoding)) + if (0 != strncasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, encoding, + strlen (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA))) { if (0 != strncasecmp (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA, encoding, @@ -1005,7 +1006,8 @@ MHD_post_process (struct MHD_PostProcessor *pp, return MHD_YES; if (pp == NULL) return MHD_NO; - if (0 == strcasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, pp->encoding)) + if (0 == strncasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, pp->encoding, + strlen(MHD_HTTP_POST_ENCODING_FORM_URLENCODED))) return post_process_urlencoded (pp, post_data, post_data_len); if (0 == strncasecmp (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA, pp->encoding,