From a93035cee3df135b72b8ff6c1d8361e2e647ed0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 17 Jan 2013 01:53:01 -0500 Subject: journal-gatewayd: return nice error on unsupported methods Returns "HTTP/1.0 406 Not Acceptable" instead of silently closing the connection. --- src/journal/journal-gatewayd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/journal/journal-gatewayd.c') diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c index 23939ccbc..4a4905dbf 100644 --- a/src/journal/journal-gatewayd.c +++ b/src/journal/journal-gatewayd.c @@ -834,7 +834,9 @@ static int request_handler( assert(method); if (!streq(method, "GET")) - return MHD_NO; + return respond_error(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE, + "Unsupported method.\n"); + if (!*connection_cls) { if (!request_meta(connection_cls)) -- cgit v1.2.3