summaryrefslogtreecommitdiffstats
path: root/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-11 18:25:32 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-05-13 08:16:15 +0000
commita54f7f57c0a8bde7574bd3428bded11b691bb546 (patch)
treec8097f1d883b8d771fe9f2032944e555436982a8 /meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch
parent0c195f1e4b14db865cd08a03d69982b133ee6fb5 (diff)
libmicrohttpd: upgrade to 0.9.54
This version of libmicrohttpd includes facilities for upgrading connections to websockets. Adopting it in advance allows to remove a patch specific to AGL needed by app-framework-binder. The patch applied here is a backport from the upstream (see https://gnunet.org/git/libmicrohttpd.git/ commit b4216c60fdb5b48f6cfec416301fc63a1167e6cd). Change-Id: I0a00752f1fe0a3e2a5a182ce687c55037345c5f7 Signed-off-by: José Bollo <jose.bollo@iot.bzh> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9349 ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Romain Forlot <romain.forlot@iot.bzh> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch')
-rw-r--r--meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch
new file mode 100644
index 000000000..de7ff30c4
--- /dev/null
+++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/Check-response-existence-on-upgrade.patch
@@ -0,0 +1,49 @@
+From: jose.bollo@iot.bzh
+Date: Thu, 4 May 2017 21:47:38 +0200
+Subject: [PATCH] Check response existence on upgrade
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When a connection upgrade is requested and when the
+request sent an error reply, the response is most of
+the time already sent when the test on
+connection->response->upgrade_handler is made, leading
+to dereferencing NULL.
+
+Two possibilities exist:
+
+ NULL == connection->response || NULL == connection->response->upgrade_handler
+
+or
+
+ NULL != connection->response && NULL == connection->response->upgrade_handler
+
+The first is prefered because it is probably safer to close the connection
+in that case.
+
+Upstream-Status: Accepted [https://gnunet.org/git/libmicrohttpd.git/commit/?id=b4216c60fdb5b48f6cfec416301fc63a1167e6cd]
+
+Change-Id: Ie6e7fc165f7fe3635ade0952bb34a0b937d38716
+Signed-off-by: José Bollo <jobol@nonadev.net>
+Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+---
+ src/microhttpd/connection.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
+index 4753d6e..91a4492 100644
+--- a/src/microhttpd/connection.c
++++ b/src/microhttpd/connection.c
+@@ -882,7 +882,7 @@ keepalive_possible (struct MHD_Connection *connection)
+ #ifdef UPGRADE_SUPPORT
+ if ( (MHD_str_equal_caseless_ (end,
+ "upgrade")) &&
+- (NULL == connection->response->upgrade_handler) )
++ (NULL == connection->response || NULL == connection->response->upgrade_handler) )
+ return MHD_NO;
+ #endif /* UPGRADE_SUPPORT */
+
+--
+2.9.3
+