相关疑难解决方法(0)

启用 nginx 分块传输编码

看起来nginx 0.8.35 可能支持分块传输编码

nginx 0.8.35 2010 年 4 月 1 日的变化

*) Change: now the charset filter runs before the SSI filter.

*) Feature: the "chunked_transfer_encoding" directive.
Run Code Online (Sandbox Code Playgroud)

这很棒,因为我正在尝试通过 nginx 反向代理将 git 更改推送到 git-http-backend 进程。出于客户端效率原因, Git HTTP 利用分块传输编码。

但是,我无法让它工作。我在 Debian Lenny 上使用 nginx 0.8.44 并使用以下配置调用:

./configure \
--sbin-path=/usr/sbin \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=www-data \
--group=www-data \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-http_realip_module
Run Code Online (Sandbox Code Playgroud)

以及以下配置文件:

server {
    server_name example.com;
    location / {
        proxy_pass  http://192.168.0.10; …
Run Code Online (Sandbox Code Playgroud)

nginx git chunked

20
推荐指数
3
解决办法
4万
查看次数

标签 统计

chunked ×1

git ×1

nginx ×1