From 04d29b29830264a5c0016a6b62df24e4e5925216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Wed, 9 Sep 2020 01:47:17 +0200 Subject: [PATCH 1/3] Enable HTTP/2 for CURL Fixes #727 --- runtime/base/base.Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/runtime/base/base.Dockerfile b/runtime/base/base.Dockerfile index 5d5caca55..fedf34586 100644 --- a/runtime/base/base.Dockerfile +++ b/runtime/base/base.Dockerfile @@ -198,6 +198,37 @@ RUN set -xe; \ RUN set -xe; \ cmake --build . --target install +############################################################################### +# LIBNGHTTP2 Build +# # https://github.com/nghttp2/nghttp2/releases +# # Needs: +# # - zlib +# # - OpenSSL +# # Needed by: +# # - curl +ENV VERSION_NGHTTP2=1.41.0 +ENV NGHTTP2_BUILD_DIR=${BUILD_DIR}/nghttp2 + +RUN set -xe; \ + mkdir -p ${NGHTTP2_BUILD_DIR}; \ + curl -Ls https://github.com/nghttp2/nghttp2/releases/download/v${VERSION_NGHTTP2}/nghttp2-${VERSION_NGHTTP2}.tar.gz \ + | tar xzC ${NGHTTP2_BUILD_DIR} --strip-components=1 + +WORKDIR ${NGHTTP2_BUILD_DIR}/ + +RUN set -xe; \ + && CFLAGS="" \ + CPPFLAGS="-I${INSTALL_DIR}/include -I/usr/include" \ + LDFLAGS="-L${INSTALL_DIR}/lib64 -L${INSTALL_DIR}/lib" \ + ./configure \ + --enable-lib-only \ + --prefix=${INSTALL_DIR} + + +RUN set -xe; \ + make install + + ############################################################################### # CURL Build # # https://github.com/curl/curl/releases/ From e1214efbc5e8495669983b6bbdbd3fa83e698cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Wed, 9 Sep 2020 09:59:50 +0200 Subject: [PATCH 2/3] Update runtime/base/base.Dockerfile Co-authored-by: Matthieu Napoli --- runtime/base/base.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/base/base.Dockerfile b/runtime/base/base.Dockerfile index fedf34586..8bc3197f6 100644 --- a/runtime/base/base.Dockerfile +++ b/runtime/base/base.Dockerfile @@ -200,6 +200,8 @@ RUN set -xe; \ ############################################################################### # LIBNGHTTP2 Build +# This adds support for HTTP 2 requests in curl. +# See https://github.com/brefphp/bref/issues/727 and https://github.com/brefphp/bref/pull/740 # # https://github.com/nghttp2/nghttp2/releases # # Needs: # # - zlib From b6aeec49de47a679ddda1e7a6a78c6e9f19d68b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Wed, 9 Sep 2020 10:17:27 +0200 Subject: [PATCH 3/3] configure curl with ngtthp2 option --- runtime/base/base.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/base/base.Dockerfile b/runtime/base/base.Dockerfile index 8bc3197f6..96079d331 100644 --- a/runtime/base/base.Dockerfile +++ b/runtime/base/base.Dockerfile @@ -277,7 +277,8 @@ RUN set -xe; \ --enable-cookies \ --with-gnu-ld \ --with-ssl \ - --with-libssh2 + --with-libssh2 \ + --with-nghttp2 RUN set -xe; \