View Issue Details

IDProjectCategoryView StatusLast Update
0001443libmicrohttpdHTTP POSTpublic2009-02-08 22:20
ReporterSimon Newton Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Summary0001443: Failure to handle a post request with a charset appended to the content-type header
DescriptionIf the Content-type header has a charset= and a type of application/x-www-form-urlencoded, the post fails

eg.

Content-type: application/x-www-form-urlencoded; charset=UTF-8
TagsNo tags attached.
Attached Files
postprocessor.diff (521 bytes)   
--- postprocessor.c	2009-01-16 09:50:33.000000000 -0800
+++ postprocessor.new	2009-01-16 10:25:44.000000000 -0800
@@ -263,7 +263,8 @@
   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_FORM_URLENCODED))
     {
       if (0 !=
           strncasecmp (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA, encoding,
postprocessor.diff (521 bytes)   

Activities

Simon Newton

2009-01-22 20:11

reporter   ~0003759

There is a similar problem within MHD_post_process()

Christian Grothoff

2009-01-23 16:58

manager   ~0003760

Fixed in SVN 8146.

Issue History

Date Modified Username Field Change
2009-01-16 11:30 Simon Newton New Issue
2009-01-16 11:30 Simon Newton File Added: postprocessor.diff
2009-01-22 20:11 Simon Newton Note Added: 0003759
2009-01-23 16:58 Christian Grothoff Status new => resolved
2009-01-23 16:58 Christian Grothoff Resolution open => fixed
2009-01-23 16:58 Christian Grothoff Assigned To => Christian Grothoff
2009-01-23 16:58 Christian Grothoff Note Added: 0003760
2009-02-08 22:20 Christian Grothoff Status resolved => closed