diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-21 19:43:07 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-21 21:12:42 +0200 |
commit | ce2f43797a1fdb4798f40c1689aa33dd0df448f4 (patch) | |
tree | 3270b7f30ffb6c95262a9fcc0383d1b7c5c17b29 | |
parent | cd8ad5965f702647ec3f72d07d91bb394a07e1bb (diff) | |
download | systemd-ce2f43797a1fdb4798f40c1689aa33dd0df448f4.tar.gz |
journal-remote: reduce scope of variable
https://github.com/systemd/systemd/pull/11953/files#r264188513
-rw-r--r-- | src/journal-remote/journal-remote-main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 329505cd2c..ac2bf648d2 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -266,7 +266,6 @@ static int request_handler( int r, code, fd; _cleanup_free_ char *hostname = NULL; bool chunked = false; - size_t len; assert(connection); assert(connection_cls); @@ -302,6 +301,8 @@ static int request_handler( header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Content-Length"); if (header) { + size_t len; + if (chunked) return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Content-Length must not specified when Transfer-Encoding type is 'chuncked'"); |