﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
493	nginx always sends 100-continue instead of delegating that responsibility to upstream server	Hugues Bruant		"What I did:

curl -X PUT http://foo.bar/api/deadbeef -T largefile

with foo.bar pointing to an ubuntu box running nginx 1.5.6 with the following configuration:

location /api {
    rewrite /api/(.+) /$1 break;
    proxy_pass http://127.0.0.1:8083;
    proxy_cache off;
    proxy_buffering off;
    proxy_cookie_path / /api/;
    proxy_http_version 1.1;
    proxy_set_header Connection $http_connection;
    proxy_ignore_headers X-Accel-Charset X-Accel-Buffering X-Accel-Limit-Rate X-Accel-Redirect X-Accel-Expires Expires Cache-Control Set-Cookie;
    proxy_read_timeout 60;
    proxy_send_timeout 60;
    proxy_set_header Verify $ssl_client_verify;
    proxy_set_header Serial $ssl_client_serial;
    proxy_set_header DName $ssl_client_s_dn;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}


What I expected:
 * nginx forwards ""Expect"" header to upstream server
 * upstream server responds with ""100 Continue""
 * nginx forwards ""100 Continue"" downstream
 * curl proceeds with upload of file data


What happened instead:
  * nginx immediately responds with ""100 Continue"", before the upstream server has a chance to return a 3xx/4xx, which pretty much renders the use of ""Expect: 100-continue"" useless
  * nginx forwards the ""Expect"" header to the upstream server, leading it to make incorrect assumptions about the state of the connection (expect no incoming packets until sending ""100 Continue"", actually get a flood of data) and to send a second ""100 Continue"""	defect	closed	major		nginx-core	1.5.x	wontfix	proxy, 100-continue		Linux aerofs 3.5.0-37-generic #58~precise1-Ubuntu SMP Wed Jul 10 17:48:11 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.5.6
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-mail --with-mail_ssl_module --add-module=/home/vagrant/package_source/nginx-1.5.6/debian/modules/nginx-auth-pam --add-module=/home/vagrant/package_source/nginx-1.5.6/debian/modules/nginx-dav-ext-module --add-module=/home/vagrant/package_source/nginx-1.5.6/debian/modules/nginx-echo --add-module=/home/vagrant/package_source/nginx-1.5.6/debian/modules/nginx-upstream-fair --add-module=/home/vagrant/package_source/nginx-1.5.6/debian/modules/ngx_http_substitutions_filter_module"
