Skip to content

Commit 19c3ab3

Browse files
Remove unnecessary tfw_http_hdr_split
It seems that we already call `tfw_http_msg_srvhdr_val` two lines below and don't need to call `tfw_http_hdr_split`.
1 parent 72ada77 commit 19c3ab3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fw/cache.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,6 @@ __set_etag(TDB *db, TfwCacheEntry *ce, TfwHttpResp *resp, long h_off,
19111911
size_t len = 0;
19121912
unsigned short flags = 0;
19131913
TfwStr h_val, *c, *end, *h = &resp->h_tbl->tbl[TFW_HTTP_HDR_ETAG];
1914-
TfwStr s_dummy = {}, s_val = {};
19151914

19161915
#define CHECK_REC_SPACE() \
19171916
while (c_size) { \
@@ -1947,8 +1946,7 @@ __set_etag(TDB *db, TfwCacheEntry *ce, TfwHttpResp *resp, long h_off,
19471946
* occupy 2 bytes (RFC 7541 section 6.2.2).
19481947
*/
19491948
e_p += TFW_CSTR_HDRLEN;
1950-
tfw_http_hdr_split(h, &s_dummy, &s_val, true);
1951-
c_size = 2 + tfw_hpack_int_size(s_val.len, 0x7F);
1949+
c_size = 2 + tfw_hpack_int_size(h_val.len, 0x7F);
19521950
CHECK_REC_SPACE();
19531951

19541952
if (test_bit(TFW_HTTP_B_HDR_ETAG_HAS_NO_QOUTES, resp->flags)) {

0 commit comments

Comments
 (0)