Opened 13 years ago

Closed 13 years ago

#43 closed defect (invalid)

Config error on chunked_transfer_encoding inside if statement

Reported by: www.google.com/accounts/o8/id?id=AItOawlbJpwanH5eyphuN_6qalDJM39nLTlypZM Owned by: somebody
Priority: minor Milestone:
Component: nginx-module Version: 1.0.x
Keywords: chunked Cc:
uname -a: Linux yoavuntu 2.6.32-34-server #77-Ubuntu SMP Tue Sep 13 20:54:38 UTC 2011 x86_64 GNU/Linux
nginx -V: nginx: nginx version: nginx/1.0.8
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6

Description

Hi,

I'm trying to turn off chunked coding for certain URLs. I have the following configuration:

server {
        listen 8088;
        location / {
                proxy_pass   http://localhost:9000;
                proxy_set_header   X-Real-IP $remote_addr;
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header   X-Forwarded-Proto http;
                proxy_set_header   Host $http_host;
                # Log API URLs should have chunked disabled
                if ($request_uri = '/api/log*') {
                    chunked_transfer_encoding off;
                }
        }
}

But I get the following error:
nginx: [emerg] "chunked_transfer_encoding" directive is not allowed here in /etc/nginx/sites-enabled/server:22

Is it a bug or is my configuration incorrect?

Thanks,
Yoav.

Change History (1)

comment:1 by Maxim Dounin, 13 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.