diff --git a/http_modifier.go b/http_modifier.go index 8ed611e..c9c3cdc 100644 --- a/http_modifier.go +++ b/http_modifier.go @@ -98,7 +98,11 @@ func (m *HTTPModifier) Rewrite(payload []byte) (response []byte) { for _, f := range m.config.headerFilters { value := proto.Header(payload, f.name) - if len(value) > 0 && !f.regexp.Match(value) { + if len(value) == 0 { + return + } + + if !f.regexp.Match(value) { return } }