Skip to content

Caddy logging zero status on response_header_timeout #7396

@betelgeuse

Description

@betelgeuse

Issue Details

I am testing reverse_proxy with a destination that just sleeps. Relevant configuration:

  log
  reverse_proxy localhost:4000 {
    transport http {
      response_header_timeout 300s
    }    
  }

I am getting the following log entry:

{"level":"info","ts":1765606291.589831,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"x.x.x.x","remote_port":"23018","client_ip":"x.x.x.x","proto":"HTTP/1.1","method":"GET","host":"xxx","uri":"/sleep?seconds=305","headers":{"Accept-Encoding":["identity"],"User-Agent":["ansible-httpget"],"Connection":["close"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"","server_name":"xxx"}},"bytes_read":0,"user_id":"","duration":284.237173119,"size":0,"status":0,"resp_headers":{"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"]}}

Expected results:

Status 504 Gateway Timeout instead of "status":0

Caddy version:

docker.io/caddy:2.10.2

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