Open miroirdelame opened 8 years ago
Per comment on the above bug:
http2 is using a completely different receive code path than the regular http. The upload tracker is based on nginx internals, and it's not surprising that it doesn't work anymore on new features. It would take some time to find and add the workarounds I had to add for http to the http2 code path, and I never found the spare time to do this (of course Pull Requests are welcome :).
Below is my Dockerfile. In this environment, with http2, "received and size issue" is still there. Please check. Thanks! { "state" : "uploading", "received" : 16516, "size" : 3330332 } { "state" : "uploading", "received" : 16516, "size" : 3330332 } { "state" : "uploading", "received" : 16516, "size" : 3330332 } ...
FROM debian:bullseye-slim
RUN apt-get update
RUN apt-get -y upgrade
WORKDIR /tmp
# Install prerequisites for Nginx compile
RUN apt-get install -y \
zlib1g \
zlib1g-dev \
libpcre3 \
libpcre3-dev \
openssl \
libssl-dev \
wget \
tar \
gcc \
make \
git
# Download Nginx and Nginx modules source code
RUN wget http://nginx.org/download/nginx-1.20.2.tar.gz -O nginx.tar.gz && \
mkdir /tmp/nginx && \
tar -xzvf nginx.tar.gz -C /tmp/nginx --strip-components=1 &&\
git clone --branch 2.3.0 https://github.com/vkholodkov/nginx-upload-module.git /tmp/nginx/nginx-upload-module &&\
git clone --depth=1 https://github.com/masterzen/nginx-upload-progress-module.git /tmp/nginx/nginx-upload-progress-module
# Build Nginx
WORKDIR /tmp/nginx
RUN ./configure \
--with-cc-opt="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2" \
--with-ld-opt="-Wl,-Bsymbolic-functions -Wl,-z,relro" \
--user=nginx \
--group=nginx \
--prefix=/usr/share/nginx \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_v2_module \
--with-pcre \
--with-file-aio \
--with-stream \
--with-stream_ssl_module \
--with-http_auth_request_module \
--add-module=nginx-upload-module \
--add-module=nginx-upload-progress-module && \
make &&\
make install
It might be linked to #44 or some other ticket.
When using HTTP/2 in my server configuration, received and size are always the same. Without HTTP/2, it just works fine.
Result of nginx -V :
My Nginx configuration is directly taken from Perusio's Drupal for Nginx (for Drupal 7 in my case) : https://github.com/perusio/drupal-with-nginx, but I'm pretty sure it can be reproduced with a more classic configuration.
In my virtualhost file : WORKS :
DOES NOT WORK :
Ask me if you need more info, but it should be easily reproducible. Thanks in advance.