summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_compression.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2025-08-20http: compression: Set the temporary file name in n_h_c_c_s_r()Andrew Clayton1-2/+2
When creating a new nxt_file_t structure in nxt_http_comp_compress_static_response() for the temporary compressed file be sure to set the *name* member. We don't generally need it, but I failed to notice that when calling nxt_file_close() if the close(2) fails then we log an error message containing the file name, which at best would have just printed junk. So set the file name for this particular error case... This issue was reported by coverity. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-21http: Compress application responsesAndrew Clayton1-0/+2
This adds initial support for compressing application responses. A couple of things to note 1) Compressed responses are sent 'chunked' as we don't know beforehand how large the compressed response will be. 2) We only compress responses where we know the Content-Length as we need to check with the 'min_length' config parameter. It's also currently how we track when we need to close the compression stream off. Co-authored-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-14http: Compress static responsesAndrew Clayton1-0/+3
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-14http: Add support for brotli compressionAndrew Clayton1-0/+16
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-14http: Add support for zstd compressionAndrew Clayton1-0/+16
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-14http: Add zlib compression supportAndrew Clayton1-0/+20
This adds support for both deflate & gzip compressors. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2025-04-14http: Add core http compression codeAndrew Clayton1-0/+48
This is the initial step to enabling HTTP compression on both static and application responses. This code itself doesn't do any actual compression, that will come in subsequent commits. It just contains the core functions for initialising structures that describe the available compressors and functions for checking if compression should be done depending on various criteria. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>