summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-17 01:53:01 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-18 01:16:30 -0500
commita93035cee3df135b72b8ff6c1d8361e2e647ed0b (patch)
tree770fbcc015881a24d0e365361f99163e73247ec8 /src/journal
parent8530a1436a50b3cfb6dc6231834bd04f56118d31 (diff)
journal-gatewayd: return nice error on unsupported methods
Returns "HTTP/1.0 406 Not Acceptable" instead of silently closing the connection.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-gatewayd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
index 23939ccbca..4a4905dbfb 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))