diff --git a/cmd/rest/client.go b/cmd/rest/client.go index ccac83ce8..99ddf432e 100644 --- a/cmd/rest/client.go +++ b/cmd/rest/client.go @@ -127,6 +127,7 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod } req.Header.Set("Authorization", "Bearer "+c.newAuthToken(req.URL.RawQuery)) req.Header.Set("X-Minio-Time", time.Now().UTC().Format(time.RFC3339)) + req.Header.Set("Expect", "100-continue") if length > 0 { req.ContentLength = length } diff --git a/cmd/storage-rest-client.go b/cmd/storage-rest-client.go index b61fb97e2..e650d41ce 100644 --- a/cmd/storage-rest-client.go +++ b/cmd/storage-rest-client.go @@ -337,10 +337,6 @@ func (client *storageRESTClient) CreateFile(ctx context.Context, volume, path st values.Set(storageRESTFilePath, path) values.Set(storageRESTLength, strconv.Itoa(int(size))) respBody, err := client.call(ctx, storageRESTMethodCreateFile, values, ioutil.NopCloser(reader), size) - if err != nil { - return err - } - _, err = waitForHTTPResponse(respBody) defer http.DrainBody(respBody) return err } diff --git a/cmd/utils.go b/cmd/utils.go index 83811134f..deedc1fdd 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -456,7 +456,7 @@ func newInternodeHTTPTransport(tlsConfig *tls.Config, dialTimeout time.Duration) WriteBufferSize: 32 << 10, // 32KiB moving up from 4KiB default ReadBufferSize: 32 << 10, // 32KiB moving up from 4KiB default IdleConnTimeout: 15 * time.Second, - ResponseHeaderTimeout: 3 * time.Minute, // Set conservative timeouts for MinIO internode. + ResponseHeaderTimeout: 15 * time.Minute, // Set conservative timeouts for MinIO internode. TLSHandshakeTimeout: 15 * time.Second, ExpectContinueTimeout: 15 * time.Second, TLSClientConfig: tlsConfig,