aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/postprocessor.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-09-29 20:35:58 +0000
committerChristian Grothoff <christian@grothoff.org>2014-09-29 20:35:58 +0000
commitee47d1636680e4132ba825a3786216b4d2fccf7f (patch)
tree8bed0d67f74ef069f13c43fee3daace00823024e /src/microhttpd/postprocessor.c
parent9e8530eea82f0c1d84f1eff5f01229e7ab6fd6d3 (diff)
downloadlibmicrohttpd-ee47d1636680e4132ba825a3786216b4d2fccf7f.tar.gz
libmicrohttpd-ee47d1636680e4132ba825a3786216b4d2fccf7f.zip
fix '+' unescape logic for URI-encoded POST data
Diffstat (limited to 'src/microhttpd/postprocessor.c')
-rw-r--r--src/microhttpd/postprocessor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 7f826304..6512c603 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -381,6 +381,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
381 return MHD_YES; /* no '=' yet */ 381 return MHD_YES; /* no '=' yet */
382 buf[pp->buffer_pos] = '\0'; /* 0-terminate key */ 382 buf[pp->buffer_pos] = '\0'; /* 0-terminate key */
383 pp->buffer_pos = 0; /* reset for next key */ 383 pp->buffer_pos = 0; /* reset for next key */
384 MHD_unescape_plus (buf);
384 MHD_http_unescape (NULL, NULL, buf); 385 MHD_http_unescape (NULL, NULL, buf);
385 poff += equals + 1; 386 poff += equals + 1;
386 pp->state = PP_ProcessValue; 387 pp->state = PP_ProcessValue;
@@ -441,6 +442,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
441 442
442 /* unescape */ 443 /* unescape */
443 xbuf[xoff] = '\0'; /* 0-terminate in preparation */ 444 xbuf[xoff] = '\0'; /* 0-terminate in preparation */
445 MHD_unescape_plus (xbuf);
444 xoff = MHD_http_unescape (NULL, NULL, xbuf); 446 xoff = MHD_http_unescape (NULL, NULL, xbuf);
445 /* finally: call application! */ 447 /* finally: call application! */
446 pp->must_ikvi = MHD_NO; 448 pp->must_ikvi = MHD_NO;