add codespell action (#18818)

Original work here, #18474,  refixed and updated.
This commit is contained in:
Harshavardhana
2024-01-17 23:03:17 -08:00
committed by GitHub
parent 21d60eab7c
commit dd2542e96c
125 changed files with 230 additions and 202 deletions
+2 -2
View File
@@ -27,11 +27,11 @@ import (
// convenient wrapper to drain any remaining data on response body.
//
// Subsequently this allows golang http RoundTripper
// to re-use the same connection for future requests.
// to reuse the same connection for future requests.
func DrainBody(respBody io.ReadCloser) {
// Callers should close resp.Body when done reading from it.
// If resp.Body is not closed, the Client's underlying RoundTripper
// (typically Transport) may not be able to re-use a persistent TCP
// (typically Transport) may not be able to reuse a persistent TCP
// connection to the server for a subsequent "keep-alive" request.
if respBody != nil {
// Drain any remaining Body and then close the connection.
+1 -1
View File
@@ -118,7 +118,7 @@ const (
// Dummy putBucketACL
AmzACL = "x-amz-acl"
// Signature V4 related contants.
// Signature V4 related constants.
AmzContentSha256 = "X-Amz-Content-Sha256"
AmzDate = "X-Amz-Date"
AmzAlgorithm = "X-Amz-Algorithm"
+1 -1
View File
@@ -32,7 +32,7 @@ type acceptResult struct {
// httpListener - HTTP listener capable of handling multiple server addresses.
type httpListener struct {
tcpListeners []*net.TCPListener // underlaying TCP listeners.
tcpListeners []*net.TCPListener // underlying TCP listeners.
acceptCh chan acceptResult // channel where all TCP listeners write accepted connection.
ctx context.Context
ctxCanceler context.CancelFunc
+1 -1
View File
@@ -109,7 +109,7 @@ func (srv *Server) Init(listenCtx context.Context, listenErrCallback func(listen
wrappedHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// If server is in shutdown.
if atomic.LoadUint32(&srv.inShutdown) != 0 {
// To indicate disable keep-alives
// To indicate disable keep-alive
w.Header().Set("Connection", "close")
w.WriteHeader(http.StatusServiceUnavailable)
w.Write([]byte(http.ErrServerClosed.Error()))