mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-06 06:40:25 +08:00
压缩匹配条件时也检查请求条件
This commit is contained in:
@@ -151,6 +151,9 @@ func (this *HTTPCompressionConfig) MaxBytes() int64 {
|
|||||||
// MatchResponse 是否匹配响应
|
// MatchResponse 是否匹配响应
|
||||||
func (this *HTTPCompressionConfig) MatchResponse(mimeType string, contentLength int64, requestExt string, formatter shared.Formatter) bool {
|
func (this *HTTPCompressionConfig) MatchResponse(mimeType string, contentLength int64, requestExt string, formatter shared.Formatter) bool {
|
||||||
if this.Conds != nil && formatter != nil {
|
if this.Conds != nil && formatter != nil {
|
||||||
|
if !this.Conds.MatchRequest(formatter) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if !this.Conds.MatchResponse(formatter) {
|
if !this.Conds.MatchResponse(formatter) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user