-
-
Notifications
You must be signed in to change notification settings - Fork 983
Open
Labels
Description
Describe the bug
Sending an http head request to ttyd returns the full response body where it should just calculate content-length and return an empty body.
To Reproduce
Steps to reproduce the behavior:
- Connect to ttyd with telnet -
telnet localhost 7681
- Send
HEAD /
- Hit Enter twice
- Observe the response body
Expected behavior
Expecting content-length to be set correctly and no data in the response body.
Additional context
This was discovered using a reverse proxy. Caddy (written in golang) logs an error returning a HEAD request from ttyd.
Unsolicited response received on idle HTTP channel starting with \
I use curl --head
in my readiness check and the current logging is too verbose and returns the body. So I've dropped --head for now, as the network traffic is the same and I don't want the ttyd index page logged every 20 seconds.