fix: return context error from context reader (#9507)

This commit is contained in:
Harshavardhana
2020-05-04 14:33:49 -07:00
committed by GitHub
parent fea4a1e68e
commit 7b58dcb28c
4 changed files with 14 additions and 9 deletions
+1 -1
View File
@@ -628,7 +628,7 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h
bucket := mux.Vars(r)["bucket"]
// To detect if the client has disconnected.
r.Body = &detectDisconnect{r.Body, r.Context().Done()}
r.Body = &contextReader{r.Body, r.Context()}
// Require Content-Length to be set in the request
size := r.ContentLength