real (relevant) bytes to be asked later, within the currently alloted time.
This applies to blocking reads only since r1621453 already bypassed the
filter for nonblocking ones.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1641376 13f79535-47bb-0310-9956-ffa450edef68
- define default for maximum line length
indepenent of MAX_STRING_LEN
- Clarify line length check with a comment
- add supported 'b' suffix to directive
description
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1631983 13f79535-47bb-0310-9956-ffa450edef68
regexp plus flatten.
The maxlen argument of ap_varbuf_regsub() is unsigned.
Passing in "AP_SUBST_MAX_LINE_LENGTH - vb.strlen"
in case vb.strlen got to big didn't result in the
expected error but instead was handled as a very big
maxlen.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1628104 13f79535-47bb-0310-9956-ffa450edef68
- fix signed/unsigned (int/size_t) comparisons,
- add consume_buffer() to factorize code used multiple times,
- cleanup passed brigade (don't rely on next output filters to do it).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1619486 13f79535-47bb-0310-9956-ffa450edef68
Fix counting of inflated bytes in deflate_in_filter() when asked to flush, since
we now count bytes per inflate() call everywhere, we can't count all the produced
bytes there.
We still need to include all the produced bytes in the brigade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1619483 13f79535-47bb-0310-9956-ffa450edef68
deflate_in_filter():
- use inflated bytes per inflate() call to compute the total output bytes,
- check zlib errors before limits,
- add missing check_ratio() when asked to flush.
deflate_out_filter():
- check ratio after each inflate() call.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1619444 13f79535-47bb-0310-9956-ffa450edef68
encounters an error. Since the core output filter only emits TRACE1, a higher
level filter shouldn't log the same condition as ERROR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1617018 13f79535-47bb-0310-9956-ffa450edef68
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
mod_deflate: The DEFLATE input filter (inflates request bodies) now
limits the length and compression ratio of inflated request bodies to avoid
denial of sevice via highly compressed bodies. See directives
DeflateInflateLimitRequestBody, DeflateInflateRatioLimit,
and DeflateInflateRatioBurst.
Thanks to Giancarlo Pellegrino and Davide Balzarotti for reporting the issue.
Submitted By: ylavic, covener
Reviewed By: jorton, covener, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610501 13f79535-47bb-0310-9956-ffa450edef68
Avoid the call to APR_BUCKET_REMOVE() + apr_bucket_delete() on the
same bucket.
Also, empty the input brigade while looping to avoid the trailing
apr_brigade_cleanup() call (no functional change).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601864 13f79535-47bb-0310-9956-ffa450edef68
PR 55547.
When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.
Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591302 13f79535-47bb-0310-9956-ffa450edef68
to 2.4. Provide DeflateAlterETag directive to choose between
2.2 behavior, 2.4 behavior, or dropping ETag from the compressed
representation.
Preserves 2.4 default which breas 304 responses for compressed content.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1586542 13f79535-47bb-0310-9956-ffa450edef68
Should we need to deal with this case, a new search should be performed to find the real starting position of another potential 'content=' pattern.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584896 13f79535-47bb-0310-9956-ffa450edef68
Don't fail when asked to flush inflated data to the user-agent and that
coincides with the end of stream ("Zlib error flushing inflate buffer").
PR 56196.
Submitted By: [Christoph Fausak <christoph.fausak glueckkanja com>]
Committed By: ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572896 13f79535-47bb-0310-9956-ffa450edef68
PR 46146 (patches from duplicated PR 55666)
Handle Zlib flags in the inflate input filter as in the output filter, using consume_zlib_flags().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572670 13f79535-47bb-0310-9956-ffa450edef68
PR 46146 (patches from duplicated PR 55666)
Handle non blocking reads which would block in the inflate input filter (not an error).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572669 13f79535-47bb-0310-9956-ffa450edef68
PR 46146 (patches from duplicated PR 55666)
Handle Zlib validation bytes buffering (CRC + length) in the inflate input filter :
- use validation_buffer and validation_length as state,
- loop until all the bytes are received.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572668 13f79535-47bb-0310-9956-ffa450edef68