Skip to content

nginx config fastcgi_request_buffering breaks streaming / chunked transfer encoding #9574

@afflux

Description

@afflux

The admin manual suggests to use fastcgi_request_buffering off for nginx configurations. However, this breaks in situations where the Content-Length header is not set (e.g. streaming upload on WebDAV, like DAVx⁵ does).

Note that PHP does not plan to change php-fpm's behavior, as the (ancient, unmaintained) FastCGI spec requires the Content-Length header: https://bugs.php.net/bug.php?id=51191

nginx does not care, because it works with enabled buffering: https://trac.nginx.org/nginx/ticket/2287

Symptom analysis here (TL;DR: bigger uploads using DAVx⁵ will always fail): seedvault-app/seedvault#505

My suggestion is to enable fastcgi_request_buffering to get this use case to work, but I don't know if anything else depends on disabled buffering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions