]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote: use MHD_HTTP_CONTENT_TOO_LARGE as MHD_HTTP_PAYLOAD_TOO_LARGE is depre...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 20 Dec 2021 11:48:32 +0000 (20:48 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Dec 2021 13:30:24 +0000 (14:30 +0100)
src/journal-remote/journal-remote-main.c
src/journal-remote/microhttpd-util.h

index 67f1267d0a6e27d881c1423ad7b3d0762b30d84c..6ab91263b1dbe9abb0bd4b079c649340f33b8d59 100644 (file)
@@ -319,7 +319,7 @@ static mhd_result request_handler(
                         /* When serialized, an entry of maximum size might be slightly larger,
                          * so this does not correspond exactly to the limit in journald. Oh well.
                          */
-                        return mhd_respondf(connection, 0, MHD_HTTP_PAYLOAD_TOO_LARGE,
+                        return mhd_respondf(connection, 0, MHD_HTTP_CONTENT_TOO_LARGE,
                                             "Payload larger than maximum size of %u bytes", ENTRY_SIZE_MAX);
         }
 
index a92ba57d0fa88da387ab3e4580576e9796e7c9b3..7e7d1b56b1b3127641c077e80779f613b4577e5a 100644 (file)
 #  define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
 #endif
 
-/* Renamed in µhttpd 0.9.53 */
-#ifndef MHD_HTTP_PAYLOAD_TOO_LARGE
-#  define MHD_HTTP_PAYLOAD_TOO_LARGE MHD_HTTP_REQUEST_ENTITY_TOO_LARGE
+/* Renamed in µhttpd 0.9.74 (8c644fc1f4d498ea489add8d40a68f5d3e5899fa) */
+#ifndef MHD_HTTP_CONTENT_TOO_LARGE
+#  ifdef MHD_HTTP_PAYLOAD_TOO_LARGE
+#    define MHD_HTTP_CONTENT_TOO_LARGE MHD_HTTP_PAYLOAD_TOO_LARGE /* 0.9.53 or newer */
+#  else
+#    define MHD_HTTP_CONTENT_TOO_LARGE MHD_HTTP_REQUEST_ENTITY_TOO_LARGE
+#  endif
 #endif
 
 #if MHD_VERSION < 0x00094203