Browse Source

Update curl in integration test Dockerfile to 7.40.0

And pin the nghttp2 version, and to something more modern.

Change-Id: Ie631b519b9ec9278b521598353730d1cfd4f8976
Brad Fitzpatrick 11 years ago
parent
commit
af958b3ad4
2 changed files with 10 additions and 41 deletions
  1. 10 8
      Dockerfile
  2. 0 33
      testdata/curl-http2-eof.patch

+ 10 - 8
Dockerfile

@@ -12,13 +12,17 @@ RUN apt-get update && \
     apt-get upgrade -y && \
     apt-get upgrade -y && \
     apt-get install -y git-core build-essential wget
     apt-get install -y git-core build-essential wget
 
 
-RUN apt-get install -y --no-install-recommends autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libevent-dev
+RUN apt-get install -y --no-install-recommends \
+       autotools-dev libtool pkg-config zlib1g-dev \
+       libcunit1-dev libssl-dev libxml2-dev libevent-dev \
+       automake autoconf
 
 
+# Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached:
+ENV NGHTTP2_VER af24f8394e43f4
 RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git
 RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git
 
 
-RUN apt-get install -y --no-install-recommends automake autoconf
-
 WORKDIR /root/nghttp2
 WORKDIR /root/nghttp2
+RUN git reset --hard $NGHTTP2_VER
 RUN autoreconf -i
 RUN autoreconf -i
 RUN automake
 RUN automake
 RUN autoconf
 RUN autoconf
@@ -27,11 +31,9 @@ RUN make
 RUN make install
 RUN make install
 
 
 WORKDIR /root
 WORKDIR /root
-RUN wget http://curl.haxx.se/download/curl-7.38.0.tar.gz
-RUN tar -zxvf curl-7.38.0.tar.gz
-WORKDIR /root/curl-7.38.0
-ADD testdata/curl-http2-eof.patch /tmp/curl-http2-eof.patch
-RUN patch -p1 < /tmp/curl-http2-eof.patch
+RUN wget http://curl.haxx.se/download/curl-7.40.0.tar.gz
+RUN tar -zxvf curl-7.40.0.tar.gz
+WORKDIR /root/curl-7.40.0
 RUN ./configure --with-ssl --with-nghttp2=/usr/local
 RUN ./configure --with-ssl --with-nghttp2=/usr/local
 RUN make
 RUN make
 RUN make install
 RUN make install

+ 0 - 33
testdata/curl-http2-eof.patch

@@ -1,33 +0,0 @@
-From c7de3617464f935f6bab113b4da1bb91253baa7e Mon Sep 17 00:00:00 2001
-From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
-Date: Sat, 13 Sep 2014 11:59:23 +0900
-Subject: [PATCH] http2: Fix busy loop when EOF is encountered
-
-Previously we did not handle EOF from underlying transport socket and
-wrongly just returned error code CURL_AGAIN from http2_recv, which
-caused busy loop since socket has been closed.  This patch adds the
-code to handle EOF situation and tells the upper layer that we got
-EOF.
----
- lib/http2.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/lib/http2.c b/lib/http2.c
-index 604514d..f86d3eb 100644
---- a/lib/http2.c
-+++ b/lib/http2.c
-@@ -744,6 +744,12 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
-   }
-
-   infof(conn->data, "nread=%zd\n", nread);
-+
-+  if(nread == 0) {
-+    failf(conn->data, "EOF");
-+    return 0;
-+  }
-+
-   rv = nghttp2_session_mem_recv(httpc->h2,
-                                 (const uint8_t *)httpc->inbuf, nread);
-
---
-2.0.1