Skip to content

Error 411 when using Transfer-Encoding: chunked via reverse proxy over unix-socket & fastcgi #7386

@mqus

Description

@mqus

Issue Details

I am running Caddy 2.10.2, as a reverse proxy in front of a gitea instance. I also have some git automation using libgit2 which only uses chunked encoding for pushing commits. In the previous version (I ran Caddy 2.8.4), this worked just fine. However in the current version, I get error 411 ("Length Required") when pushing.

I could not see any related logging on the gitea side so I assumed the error code came from caddy. Since I didn't find any related bug requests here, I assumed some mistake on my side, but I then remembered that I had the kinda weird setup of proxying not via ip+port, but rather via unix socket and fastcgi on top, gitea supports this just fine. I didn't have any particular reason for that, so I switched back to the normal setup (localhost+port) and everything just worked again.

I am not sure how a minimal reproduction would look like (and I am still not 100% sure this issue is on the caddy side), so take this bug report with a grain of salt :)

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions