From a9d855e75241c1e8f6aee27f5452f9efd5045773 Mon Sep 17 00:00:00 2001 From: toranger Date: Thu, 20 Dec 2018 20:45:51 +0800 Subject: [PATCH] remove the content-type when the request body is empty --- cos.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cos.go b/cos.go index 35ee625..fe35741 100644 --- a/cos.go +++ b/cos.go @@ -134,8 +134,6 @@ func (c *Client) newRequest(ctx context.Context, baseURL *url.URL, uri, method s reader = bytes.NewReader(b) contentMD5 = base64.StdEncoding.EncodeToString(calMD5Digest(b)) } - } else { - contentType = contentTypeXML } req, err = http.NewRequest(method, urlStr, reader)