显然 Nginx 现在支持分块,但是当平板设备向 Nginx 发送分块请求时,我收到错误“411 Length Required”。关于如何配置 Nginx 以支持分块的任何建议?我正在使用 v.1.3.9。
我知道有人问过类似的问题,但那是在 2010 年 Nginx 支持分块之前。
我的 nginx.conf:
master_process off;
worker_processes 1;
daemon off;
pid /usr/nginx/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
ngao_filters_directory /usr/nginx/filters;
include mime.types;
default_type application/octet-stream;
# prevent caching by client
add_header Cache-Control "no-store, no-cache";
sendfile on;
keepalive_timeout 65;
server {
listen 8081;
server_name localhost;
client_max_body_size 3m;
chunked_transfer_encoding on;
scgi_temp_path /usr/nginx/scgi_temp;
uwsgi_temp_path /usr/nginx/uwsgi_temp;
location / {
proxy_buffering off;
proxy_pass http://10.0.2.20:79;
}
error_page 500 502 503 504 …Run Code Online (Sandbox Code Playgroud) nginx ×1