chiark / gitweb /
journal-gatewayd: return nice error on unsupported methods
[elogind.git] / src / journal / journal-gatewayd.c
index 23939ccbca9bcd7e2a2fc90455ebf7bf5ae3ccf4..4a4905dbfb8b94dd4498879c1e8d104b340269fd 100644 (file)
@@ -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))