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>
This commit is contained in:
Brad Fitzpatrick 2020-04-05 08:45:29 -07:00 committed by Brad Fitzpatrick
parent 7bf436ba30
commit 996bf9cae7

View File

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