Do not call multiple response.WriteHeader calls (#6733)

Execute method in s3Select package makes a response.WriteHeader call.

Not calling it again in SelectObjectContentHandler function in case of
error in s3Select.Execute call.
This commit is contained in:
kannappanr 2018-10-31 14:09:26 -07:00 committed by GitHub
parent 4280e68de3
commit 9ed7fb4916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -269,10 +269,7 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
}
// Executes the query on data-set
if err = s3select.Execute(w, s3s); err != nil {
writeErrorResponse(w, toAPIErrorCode(err), r.URL)
return
}
s3select.Execute(w, s3s)
for k, v := range objInfo.UserDefined {
logger.GetReqInfo(ctx).SetTags(k, v)