logtail: don't send a User-Agent

Just useless bytes on the wire. Especially with HTTP/1.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
reviewable/pr260/r1
Brad Fitzpatrick 5 years ago committed by Brad Fitzpatrick
parent 7bf436ba30
commit 996bf9cae7

@ -295,6 +295,7 @@ func (l *logger) upload(ctx context.Context, body []byte) (uploaded bool, err er
if l.zstdEncoder != nil { if l.zstdEncoder != nil {
req.Header.Add("Content-Encoding", "zstd") req.Header.Add("Content-Encoding", "zstd")
} }
req.Header["User-Agent"] = nil // not worth writing one; save some bytes
maxUploadTime := 45 * time.Second maxUploadTime := 45 * time.Second
ctx, cancel := context.WithTimeout(ctx, maxUploadTime) ctx, cancel := context.WithTimeout(ctx, maxUploadTime)

Loading…
Cancel
Save