@@ -847,11 +847,17 @@ tfw_cache_send_304(TfwHttpReq *req, TfwCacheEntry *ce)
847
847
848
848
resp -> mit .start_off = FRAME_HEADER_SIZE ;
849
849
850
- r = tfw_h2_resp_status_write (resp , 304 , TFW_H2_TRANS_EXPAND ,
851
- true);
850
+ r = tfw_h2_resp_status_write (resp , 304 , false, true);
852
851
if (unlikely (r ))
853
852
goto err_setup ;
854
- h_len ++ ; /* account for :status field itself */
853
+ /* account for :status field itself */
854
+ h_len ++ ;
855
+
856
+ /*
857
+ * Responses built from cache has room for frame header reserved
858
+ * in SKB linear data.
859
+ */
860
+ resp -> mit .frame_head = it -> skb_head -> data ;
855
861
}
856
862
857
863
/* Put 304 headers */
@@ -2418,8 +2424,7 @@ tfw_cache_set_hdr_age(TfwHttpResp *resp, TfwCacheEntry *ce)
2418
2424
2419
2425
if (to_h2 ) {
2420
2426
h_age .hpack_idx = 21 ;
2421
- if ((r = tfw_hpack_encode (resp , & h_age , TFW_H2_TRANS_EXPAND ,
2422
- false)))
2427
+ if ((r = tfw_hpack_encode (resp , & h_age , false, false)))
2423
2428
goto err ;
2424
2429
} else {
2425
2430
if ((r = tfw_http_msg_expand_data (& mit -> iter , skb_head ,
@@ -2560,11 +2565,17 @@ tfw_cache_build_resp(TfwHttpReq *req, TfwCacheEntry *ce, long lifetime,
2560
2565
|| (lifetime > ce -> lifetime
2561
2566
&& tfw_h2_set_stale_warn (resp ))
2562
2567
|| (!test_bit (TFW_HTTP_B_HDR_DATE , resp -> flags )
2563
- && tfw_h2_add_hdr_date (resp , TFW_H2_TRANS_EXPAND , true)))
2568
+ && tfw_h2_add_hdr_date (resp , true)))
2564
2569
goto free ;
2565
2570
2566
2571
h_len += mit -> acc_len ;
2567
2572
2573
+ /*
2574
+ * Responses built from cache has room for frame header reserved
2575
+ * in SKB linear data.
2576
+ */
2577
+ resp -> mit .frame_head = it -> skb_head -> data ;
2578
+
2568
2579
/*
2569
2580
* Split response to h2 frames. Don't write body with generic function,
2570
2581
* just indicate that we have body for correct framing.
0 commit comments