Skip to content

Commit 4582ef9

Browse files
authored
bugfix: fix zstd accept-encoding match bug (#20) (#21)
1 parent 25d88c2 commit 4582ef9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

filter/ngx_http_zstd_filter_module.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ ngx_http_zstd_accept_encoding(ngx_str_t *ae)
641641
{
642642
u_char *p;
643643

644-
p = ngx_strcasestrn(ae->data, "zstd", sizeof("zstd") - 1);
644+
p = ngx_strcasestrn(ae->data, "zstd", sizeof("zstd") - 2);
645645
if (p == NULL) {
646646
return NGX_DECLINED;
647647
}
@@ -1014,4 +1014,4 @@ ngx_conf_zstd_set_num_slot_with_negatives(ngx_conf_t *cf, ngx_command_t *cmd, vo
10141014
}
10151015

10161016
return NGX_CONF_OK;
1017-
}
1017+
}

0 commit comments

Comments
 (0)