加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

在Nginx v.1.3.9中启用Chunked Transfer编码

发布时间:2020-12-13 21:39:31 所属栏目:Nginx 来源:网络整理
导读:显然Nginx现在支持Chunked,但是当平板电脑设备向Nginx发送Chunked请求时,我收到错误“411 Length Required”.关于如何配置Nginx以支持Chunked的任何建议? 我正在使用v.1.3.9. 我知道一个类似的问题是asked,但它是在2010年之前,在Nginx支持chunked. 我的ngin

显然Nginx现在支持Chunked,但是当平板电脑设备向Nginx发送Chunked请求时,我收到错误“411 Length Required”.关于如何配置Nginx以支持Chunked的任何建议?
我正在使用v.1.3.9.

我知道一个类似的问题是asked,但它是在2010年之前,在Nginx支持chunked.

我的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  /50x.html;
        location = /50x.html {
            root   html;
        } } }
最佳答案
(发表回复,因为我无法发表评论.需要> 50声誉)

你应该read this.

The trick is to set proxy_buffering off; in your location block.

^ —我看你已经尝试过了.

Nginx does not currently support chunked POST requests […]
The only working solution I found is this:
07001

^ —但我认为这是你最好的选择.这意味着你需要编译nginx

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读