mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
Return error response header only for HEAD method (#6709)
This commit is contained in:
committed by
Harshavardhana
parent
88c3dd49c6
commit
c6ec3fdfba
@@ -783,7 +783,11 @@ type sseTLSHandler struct{ handler http.Handler }
|
||||
func (h sseTLSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
// Deny SSE-C requests if not made over TLS
|
||||
if !globalIsSSL && (crypto.SSEC.IsRequested(r.Header) || crypto.SSECopy.IsRequested(r.Header)) {
|
||||
writeErrorResponseHeadersOnly(w, ErrInsecureSSECustomerRequest)
|
||||
if r.Method == http.MethodHead {
|
||||
writeErrorResponseHeadersOnly(w, ErrInsecureSSECustomerRequest)
|
||||
} else {
|
||||
writeErrorResponse(w, ErrInsecureSSECustomerRequest, r.URL)
|
||||
}
|
||||
return
|
||||
}
|
||||
h.handler.ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user