api: Set appropriate content-type for success/error responses. (#3537)

Golang HTTP client automatically detects content-type but
for S3 clients this content-type might be incorrect or
might misbehave.

For example:

```
Content-Type: text/xml; charset=utf-8
```

Should be
```
Content-Type: application/xml
```

Allow this to be set properly.
This commit is contained in:
Harshavardhana
2017-01-06 00:37:00 -08:00
committed by GitHub
parent c8f57133a4
commit 926c75d0b5
10 changed files with 260 additions and 240 deletions

View File

@@ -231,5 +231,5 @@ func (a authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
a.handler.ServeHTTP(w, r)
return
}
writeErrorResponse(w, r, ErrSignatureVersionNotSupported, r.URL.Path)
writeErrorResponse(w, ErrSignatureVersionNotSupported, r.URL)
}