1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

795 Commits

Author SHA1 Message Date
Yann Ylavic
6eaa07d635 Rollback r1591302, wrong file commited.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591307 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:21:05 +00:00
Yann Ylavic
f3ec657e4f mod_cache: Don't add cached/revalidated entity headers to a 304 response.
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
2014-04-30 14:14:53 +00:00
Yann Ylavic
f96bc81bc4 mod_deflate: follow up to r1587639.
Don't break the looped brigade when moving the FLUSH bucket to the returned bb
and continue reading.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1590509 13f79535-47bb-0310-9956-ffa450edef68
2014-04-27 22:39:32 +00:00
Yann Ylavic
b7dc732b76 mod_deflate: Don't return gzip-ed data when reading FLUSH bucket in INFLATE
input filter, forward the FLUSH but keep reading should EOS/more
             follow (should not happen, but mod_deflate won't fix it).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587639 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:21:45 +00:00
Yann Ylavic
59efbca396 mod_deflate: Delay INFLATE input filter's self removal until all the buffered
buckets are out (including EOS). PR 46146.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587594 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 14:29:30 +00:00
Yann Ylavic
3ee747a93d mod_deflate: update empty log tags.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1586745 13f79535-47bb-0310-9956-ffa450edef68
2014-04-11 18:59:30 +00:00
Eric Covener
2cd0b69c2d be explicit, for now the 0 val is the default, but it's
a likely candidate for someone to flip later.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1586543 13f79535-47bb-0310-9956-ffa450edef68
2014-04-11 02:44:23 +00:00
Eric Covener
0eb1b009f6 Attempt to make progress on PR39727/PR45023 blocking migration
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
2014-04-11 02:42:05 +00:00
Christophe Jaillet
678b982734 Do not perform a p+= 7 that could go past the end of the buffer in case we find a 'content' without a corresponding '='.
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
2014-04-04 20:30:38 +00:00
Christophe Jaillet
ac219afd63 Do not scan past the end of the buffer.
If no terminating delimiter is found, just leave things as it is

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584884 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 20:17:46 +00:00
Christophe Jaillet
a90035fa8d Do not delete the wrong data from HTML code when a "http-equiv" meta tag specifies a Content-Type behind any other "http-equiv" meta tag.
PR 56287 [Micha Lenk <micha lenk info>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584878 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 19:59:06 +00:00
Jeff Trawick
322ae11788 s/comment/self-documenting/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1583008 13f79535-47bb-0310-9956-ffa450edef68
2014-03-29 14:58:24 +00:00
Eric Covener
575f6bef60 mod_reqtimeout: Resolve unexpected timeouts on keepalive requests
under the Event MPM. PR56216.  

Submitted By: Frank Meier <frank meier ergon ch>
Committed By: covener




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580568 13f79535-47bb-0310-9956-ffa450edef68
2014-03-23 18:59:37 +00:00
Yann Ylavic
146a8d0064 mod_deflate: when consuming zlibs flags, APR_INCOMPLETE implies no more bytes available.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573224 13f79535-47bb-0310-9956-ffa450edef68
2014-03-01 20:34:55 +00:00
Yann Ylavic
bd82e79001 mod_deflate: follows up r1572896.
Be safe from successive or post end-of-stream flush buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572911 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 10:42:47 +00:00
Yann Ylavic
6175046246 mod_deflate:
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
2014-02-28 09:42:41 +00:00
Yann Ylavic
a65687806d Commit 6 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Ignore empty buckets and split buckets longer than INT_MAX (since zlib uses 32-bit ints only) in all filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572671 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 18:15:03 +00:00
Yann Ylavic
a915ff1f64 Commit 5 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
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
2014-02-27 18:08:34 +00:00
Yann Ylavic
e3171b7fa6 Commit 4 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
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
2014-02-27 18:01:38 +00:00
Yann Ylavic
50c0de8c98 Commit 3 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
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
2014-02-27 17:57:13 +00:00
Yann Ylavic
c273acce07 Commit 2 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib header buffering in the inflate input filter :
- loop until all the header is received,
- handle non blocking reads returning empty brigade,
- fix a double ap_get_brigade() when an EOS brigade is encountered while reading the header,
- in that case and no data was received so far, don't return an error but SUCCESS with the EOS, otherwise fail,
- don't remove the Content-Length and Content-MD5 headers until some data is read.

Still does not handle Zlib flags for now, next commits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572663 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 17:35:58 +00:00
Yann Ylavic
3f8a64e490 Commit 1 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib header buffering in the inflate output filter :
- add the new deflate_ctx_t fields needed to re-enter the Zlib header parsing,
- introduce the new consume_zlib_flags() function to parse/consume the ZLib flags (will be used by the other filters too),
- use it to handle incomplete header in the output filter (deflate).

This alone fixes PR 55666, but the issue remains for PR 46146 (inflate/deflate input filters), hence the following patches.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572655 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 16:56:07 +00:00
Jan Kaluža
82f90723be mod_deflate: fix decompression of files larger than 4GB. According to RFC1952,
Input SIZE (compLen) contains the size of the original input data modulo 2^32.

PR: 56062
Submitted by: Lukas Bezdicka


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572092 13f79535-47bb-0310-9956-ffa450edef68
2014-02-26 15:30:25 +00:00
Eric Covener
e5e62d9e8b *) mod_filter: Add "change=no" as a proto-flag to FilterProtocol
to remove a providers initial flags set at registration time.
     [Eric Covener]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519475 13f79535-47bb-0310-9956-ffa450edef68
2013-09-02 17:03:47 +00:00
Rainer Jung
c86f6fc538 Improve error detection when decompressing
request bodies with trailing garbage:
- handle case where trailing bytes are in
  the same bucket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1502772 13f79535-47bb-0310-9956-ffa450edef68
2013-07-13 11:04:58 +00:00
Guenter Knauf
9a3bcd7794 Killed another warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1500519 13f79535-47bb-0310-9956-ffa450edef68
2013-07-07 19:39:09 +00:00
Guenter Knauf
8c170296bf Fixed type.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1500345 13f79535-47bb-0310-9956-ffa450edef68
2013-07-06 23:46:16 +00:00
Stefan Fritsch
e45b79e5e6 style fix (no code change)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1499679 13f79535-47bb-0310-9956-ffa450edef68
2013-07-04 08:44:26 +00:00
Eric Covener
231d3a9278 protect 'AP_DECLARE_MODULE(deflate)' from expansion to
'AP_DECLARE_MODULE(z_deflate)' if zlib has been built with
-DZ_PREFIX.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1495825 13f79535-47bb-0310-9956-ffa450edef68
2013-06-23 14:56:27 +00:00
Graham Leggett
1fabe43817 Note that the function will be available in APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490294 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 14:11:04 +00:00
Joe Orton
9d61001295 * modules/filters/mod_ratelimit.c (rate_limit_filter): Log the error
code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487530 13f79535-47bb-0310-9956-ffa450edef68
2013-05-29 16:12:10 +00:00
Graham Leggett
02046df398 mod_deflate: Make sure we process any EOS bucket in our brigade and
save going the long way round.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1484914 13f79535-47bb-0310-9956-ffa450edef68
2013-05-21 19:28:29 +00:00
Graham Leggett
44b8351ffd mod_deflate: Remove assumptions as to when an EOS bucket might arrive.
Gracefully step aside if the body size is zero.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1484832 13f79535-47bb-0310-9956-ffa450edef68
2013-05-21 15:10:46 +00:00
Christophe Jaillet
48c6af9348 make the "ProxyHTMLFixups" options case insensitive in mod_proxy_html
PR 54420 reported by Tianyin Xu [tixu cs ucsd edu]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1464762 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 21:03:03 +00:00
Stefan Fritsch
e00688ffd9 Use %pm available since apr 1.3 instead of an extra call to apr_strerror
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463056 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 21:29:28 +00:00
Jim Jagielski
44319eb4c0 Keep mod_req clear. Simply scan thru input filters and
remove it within the ws submodule. Nasty, but it keeps
mod_req untouched (for now ;) )

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458447 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 18:27:17 +00:00
Jim Jagielski
2495e8e452 allow bypass and removal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458411 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 17:07:07 +00:00
Jim Jagielski
1d34680555 temp work-around... better ways to do this, but
let's use the websocket tunnel feedback to determine
what we need.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458407 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 16:56:41 +00:00
Jim Jagielski
3e131b9898 Allow modules to pro-actively bypass the reqtimeout filter (by connection)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458284 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 13:56:29 +00:00
Christophe Jaillet
bb69ec6cfe Remove useless tests.
Turn
   if (*x && apr_isspace(*x))
into
   if (apr_isspace(*x))

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 21:25:46 +00:00
Thomas J. Donovan
ec814660e3 bug 54548 - use new expr parser with 'elif', like 'if'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1449479 13f79535-47bb-0310-9956-ffa450edef68
2013-02-24 13:58:07 +00:00
Nick Kew
a93d90a531 mod_proxy_html: bugfixes and introduce HTML5 doctype
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1442409 13f79535-47bb-0310-9956-ffa450edef68
2013-02-04 22:32:25 +00:00
Christophe Jaillet
4aecaa528f Fix error because of negative rate-limit
PR : 52964
Submitted by: Tianyin Xu <tixu cs ucsd edu>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1439623 13f79535-47bb-0310-9956-ffa450edef68
2013-01-28 20:57:10 +00:00
Christophe Jaillet
ee99c0c513 According to my testing, one special case of 'log_xlate_error', i.e. EES_INCOMPLETE_CHAR,
is 13x (!!!) faster with the use 'ap_bin2hex' instead of apr_snprintf(..., "%02X" + srlen for each character.

Output is *not* exactly the same. It was uppercase, now it is lowercase.
It is just for logging, so I don't think it is an issue.
Should it be, a call to ap_strtoupper can be added.

So sad it is just for logging in case of error... no real speedup to be expected in real life .


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429582 13f79535-47bb-0310-9956-ffa450edef68
2013-01-06 19:48:40 +00:00
Gregg Lewis Smith
d559055384 Fix various clone/edit and search/replace errors
in MSVC project files



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420975 13f79535-47bb-0310-9956-ffa450edef68
2012-12-12 21:14:57 +00:00
Stefan Fritsch
2369b0ecd5 Fix a few 'too many arguments for format' warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418769 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 22:26:12 +00:00
Christophe Jaillet
d275f854fa Add some __attribute__ for automatic format checking.
Correct one catch in sed0.c.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418556 13f79535-47bb-0310-9956-ffa450edef68
2012-12-07 23:39:05 +00:00
Jim Jagielski
9e0df917dd *) mod_xml2enc: Fix problems with charset conversion altering the
Content-Length. [Micha Lenk <micha lenk info>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407248 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 20:00:38 +00:00
Christophe Jaillet
1948bf5f9a Use 'ap_strcasestr' instead of a strdup/str_tolower/strstr sequence
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1398970 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 20:07:30 +00:00
Graham Leggett
dcdc124c70 mod_include: When an include file or virtual path fails, include the result
code that tells us why.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1393058 13f79535-47bb-0310-9956-ffa450edef68
2012-10-02 17:41:00 +00:00