Skip to content

Commit

Permalink
Correctly compare If-Range etags
Browse files Browse the repository at this point in the history
  • Loading branch information
rsamoilov committed Aug 17, 2024
1 parent bc68ba0 commit 325c56d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/iodine/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ int http_sendfile2(http_s *h, const char *prefix, size_t prefix_len,
if (!ifrange_hash)
ifrange_hash = fiobj_hash_string("if-range", 8);
FIOBJ tmp = fiobj_hash_get2(h->headers, ifrange_hash);
if (tmp && fiobj_iseq(tmp, etag_str)) {
if (tmp && !fiobj_iseq(tmp, etag_str)) {
fiobj_hash_delete2(h->headers, range_hash);
} else {
tmp = fiobj_hash_get2(h->headers, range_hash);
Expand Down

0 comments on commit 325c56d

Please sign in to comment.