From: Adam Dickmeiss Date: Wed, 15 Oct 2008 09:45:15 +0000 (+0200) Subject: Fixed check for application/x-www-form-urlencoded parameters. X-Git-Tag: v1.0.11~2 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=67ebd94d4bd94b8ade005dfa371638e0855f84d1 Fixed check for application/x-www-form-urlencoded parameters. Fixed check for application/x-www-form-urlencoded parameters. When the content type had a charset specified ;charset=.. for the content type the match for POST parameters failed. The charset spec is is ignored in the comparison. Better be UTF-8! Pazpar2 also now logs the POST content. --- diff --git a/src/http.c b/src/http.c index ec72838..2ad82ce 100644 --- a/src/http.c +++ b/src/http.c @@ -589,7 +589,8 @@ struct http_request *http_parse_request(struct http_channel *c, r->content_len = start + len - buf; r->content_buf = buf; - if (!strcmp(content_type, "application/x-www-form-urlencoded")) + if (!yaz_strcmp_del("application/x-www-form-urlencoded", + content_type, "; ")) { http_parse_arguments(r, c->nmem, r->content_buf); } @@ -888,6 +889,8 @@ static void http_io(IOCHAN i, int event) hc->request->path, *hc->request->search ? "?" : "", hc->request->search); + if (hc->request->content_buf) + yaz_log(YLOG_LOG, "%s", hc->request->content_buf); if (http_weshouldproxy(hc->request)) http_proxy(hc->request); else