gitproto: dump outgoing POST request line+headers under HTTP_TRACE

main

Commit

Soph4mo ago

Adds httputil.DumpRequestOut on POST requests when GITSYNC_HTTP_TRACE is enabled, so the actual wire-format request (Transfer-Encoding, Content-Length, headers added by Go's transport) is visible alongside the connection-level trace. Authorization values are redacted so credentials don't leak into shared logs.

Body is not consumed (body=false). The dump runs once per POST and goes to stderr like the rest of the trace.

Use case: when a server behaves unexpectedly on a POST, the connection-level trace tells you which TCP/TLS connection was used but not what the request looked like on the wire — Transfer-Encoding, Content-Length, headers Go's transport added. This fills that gap.