From 67ebd94d4bd94b8ade005dfa371638e0855f84d1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 15 Oct 2008 11:45:15 +0200 Subject: [PATCH] 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. --- src/http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.7.10.4