This is an automated email from the ASF dual-hosted git repository.
calavera pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 3181f68 Skip compressible content type check with null strings.
3181f68 is described below
commit 3181f686e7ce1f8ca903dd5eec1136968f8024b4
Author: David Calavera <[email protected]>
AuthorDate: Sun Mar 29 13:30:01 2020 -0700
Skip compressible content type check with null strings.
Signed-off-by: David Calavera <[email protected]>
---
plugins/compress/configuration.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/plugins/compress/configuration.cc
b/plugins/compress/configuration.cc
index a8afd3f..67ced83 100644
--- a/plugins/compress/configuration.cc
+++ b/plugins/compress/configuration.cc
@@ -204,7 +204,10 @@ HostConfiguration::is_content_type_compressible(const char
*content_type, int co
for (StringContainer::iterator it = compressible_content_types_.begin(); it
!= compressible_content_types_.end(); ++it) {
const char *match_string = it->c_str();
- bool exclude = match_string[0] == '!';
+ if (match_string == nullptr) {
+ continue;
+ }
+ bool exclude = match_string[0] == '!';
if (exclude) {
++match_string; // skip '!'