mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
Former-commit-id: 60d9b0d77693895fdfbebe83712e9cc1ee3f8f26
This commit is contained in:
@@ -182,8 +182,8 @@ var _ ResponseWriter = (*CompressResponseWriter)(nil)
|
||||
// It returns the best candidate among "gzip", "defate", "br", "snappy" and "s2"
|
||||
// based on the request's "Accept-Encoding" header value.
|
||||
func AcquireCompressResponseWriter(w ResponseWriter, r *http.Request, level int) (*CompressResponseWriter, error) {
|
||||
acceptEncoding := r.Header.Values(AcceptEncodingHeaderKey)
|
||||
|
||||
// acceptEncoding := r.Header.Values(AcceptEncodingHeaderKey)
|
||||
acceptEncoding := r.Header[AcceptEncodingHeaderKey]
|
||||
if len(acceptEncoding) == 0 {
|
||||
return nil, ErrResponseNotCompressed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user