Buffer reuse like gzip filter module, with pre-configured number of buffers

hanzhai nginx-forum at forum.nginx.org
Wed Jun 1 12:45:52 UTC 2022


Hi,

I also did these in my header_filter to make sure that the modified response
is sent to the client with chunked encoding.

        ngx_http_clear_content_length(r);
        ngx_http_clear_accept_ranges(r);
        ngx_http_clear_etag(r);

        ngx_table_elt_t *header_entry =
ngx_list_push(&r->headers_out.headers);
        if (header_entry == NULL) {
            return ngx_http_t1k_bot_rsp_body_next_header_filter(r);
        }

        header_entry->hash = 1;
        header_entry->key.len = t1k_confuse_header_key.len;
        header_entry->key.data = (u_char *)t1k_confuse_header_key.data;
        header_entry->value.len = t1k_confuse_header_value.len;
        header_entry->value.data = (u_char *)t1k_confuse_header_value.data;

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,294374,294387#msg-294387



More information about the nginx mailing list