mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
journal-gatewayd: return nice error on unsupported methods
Returns "HTTP/1.0 406 Not Acceptable" instead of silently closing the connection.
This commit is contained in:
parent
8530a1436a
commit
a93035cee3
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user