Skip to content

HEAD response through reverse proxy is missing content-length header #457

Open
@jtmcdole

Description

@jtmcdole

Setup

  • Running a gitea server with docker container registry on ubuntu 24
  • Docker Desktop on Windows 11

Expected

Content-Length is passed through as Content-Length: 9757

Observed

Windows 11 + curl (through proxy): missing header

curl -v  -H "accept: application/json" -H "Authorization: Bearer <A TOKEN>" -I "https://a-server/v2/<a-user>/<a-container>/manifests/latest"

...

HTTP/2 200
content-type: application/vnd.docker.distribution.manifest.v2+json
docker-content-digest: sha256:eb4c6be0a6cf50c72a2375f53cd21411d728a925b0ea056f3798606b1297e12c
docker-distribution-api-version: registry/2.0
etag: "sha256:eb4c6be0a6cf50c72a2375f53cd21411d728a925b0ea056f3798606b1297e12c"
date: Thu, 05 Jun 2025 02:56:53 GMT
server: LiteSpeed

On server + curl directly to the gitea instance: header present

curl -v  -H "accept: application/json" -H "Authorization: Bearer <A TOKEN>" -I "localhost:3001/v2/<a-user>/<a-container>/manifests/latest"

...
HTTP/1.1 200 OK
Content-Length: 9757
Content-Type: application/vnd.docker.distribution.manifest.v2+json
Docker-Content-Digest: sha256:eb4c6be0a6cf50c72a2375f53cd21411d728a925b0ea056f3798606b1297e12c
Docker-Distribution-Api-Version: registry/2.0
Etag: "sha256:eb4c6be0a6cf50c72a2375f53cd21411d728a925b0ea056f3798606b1297e12c"
Date: Thu, 05 Jun 2025 02:56:32 GMT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions