mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 11:41:39 +00:00
logtail: remove unncessary response read
Effectively reverts #249, since the server side was fixed (with #251?) to send a 200 OK/content-length 0 response. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
ce99474317
commit
a2be1aabfa
@ -463,14 +463,6 @@ func (l *Logger) upload(ctx context.Context, body []byte, origlen int) (uploaded
|
|||||||
return uploaded, fmt.Errorf("log upload of %d bytes %s failed %d: %q", len(body), compressedNote, resp.StatusCode, b)
|
return uploaded, fmt.Errorf("log upload of %d bytes %s failed %d: %q", len(body), compressedNote, resp.StatusCode, b)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to read to EOF, in case server's response is
|
|
||||||
// chunked. We want to reuse the TCP connection if it's
|
|
||||||
// HTTP/1. On success, we expect 0 bytes.
|
|
||||||
// TODO(bradfitz): can remove a few days after 2020-04-04 once
|
|
||||||
// server is fixed.
|
|
||||||
if resp.ContentLength == -1 {
|
|
||||||
resp.Body.Read(make([]byte, 1))
|
|
||||||
}
|
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user