mod_cache_socache.c

Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge of r1426802,1744460,1829799,1824716,1838318,1840678,1861294

*) easy patches to synch 2.4.x and trunk:

- core: extend description of r->hostname

- mod_proxy_http: Avoid memory allocation before making sure that this handler can handle the URL

- core: Save a few cycles in 'ap_parse_form_data()'

- mod_cache_socache: Save some cycles

- mod_proxy_ftp: Save some cycle

- vhost: move an assignment to the end of the loop to ease readability and please a compiler

- core: Be a little more verbose when an error in trigerred in 'ap_set_file_slot()'

  1. … 8 more files in changeset.
Merge r1853874, r1853938 from trunk:

mod_cache_socache: avoid pool to heap reallocation.

Below some threshold, the previous code tried free (sub-)pooled memory ASAP by

moving small buffers (< capacity / 2) to a heap bucket. But this is not really

an optimization because first it requires at some point to allocate more than

the configured capacity, and second since this happens during response handling

the pool is about to be destroyed soon anymay.

This commit simply keeps the data in the subpool and uses a pool bucket for the

output brigade to take care of the lifetime until it's consumed (or not).

Follow up to r1853874: CHANGES entry.

Submitted by: ylavic

Reviewed by: ylavic, icing, jim

  1. … 3 more files in changeset.
*) mod_cache_socache: Fix caching of empty headers up to carriage return.

trunk patch: http://svn.apache.org/r1824343

2.4.x patch: trunk works (modulo CHANGES)

+1: ylavic, rpluem, minfrin

  1. … 3 more files in changeset.
Merge r1551611, r1783765, r1788996, r1788998, r1789000, r1795651 from trunk:

Log a warning when the LDAP authn provider is configured but an AuthLDAPURL

isn't -- IOW, avoid silently skipping a misconfigured [or buggy?] LDAP provider.

Follow up to r1772919: update APLOGNO().

Save a few cycles.

'apr_pstrcatv' can compute the length of the new string for us.

Improve indentation

Group bit field values in order to save some memory.

Add an explicit NULL to initialise a field in an authn_provider structure, as done in all other places. PR 60636

Submitted by: covener, ylavic, jailletc36, jailletc36, jailletc36, jailletc36

Reviewed by: jailletc36, jim, ylavic

  1. … 4 more files in changeset.
Merge r1721899 from trunk:

mod_cache_socache: Fix a possible cached entity body corruption when it

is received from an origin server in multiple batches and forwarded by

mod_proxy.

Upstream buckets should be setaside when saving response body (store_body),

but since those will finally be flatten in the cache buffer (commit_entity),

let's save them directly into the buffer to avoid heap allocation(s) and

the final copy.

Reported by: Mike Pastore <mike oobak.org>

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1700317, r1700318, r1700319, r1700320, r1700321, r1700322, r1700326, r1700328, r1700330, r1700331, r1700332, r1700334, r1700336, r1700338 from trunk:

Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting

Silence a sparse warning about inconsistent indenting

Silence a sparse warning about inconsistent indenting

Silence a sparse warning about inconsistent indenting

Silence a sparse warning about inconsistent indenting

Silence a sparse warning about inconsistent indenting + some minor style issues

Remove useless line

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Submitted by: jailletc36

Reviewed/backported by: jim

  1. … 16 more files in changeset.
Merge r1671397, r1672466, r1672564 from trunk:

Add output for "?auto" version of server-status

to proxy status, mod_ssl session cache info,

mod_cache_socache and the status hook of the

individual socache implementations.

Followon to r1671397 for proxy server-status

in auto mode:

- don't show HTML legend

- Show correct worker name

More followon to r1671397 for proxy server-status

in auto mode:

- remove remaining HTML markup

Submitted by: rjung

Reviewed/backported by: jim

  1. … 8 more files in changeset.
Merge r1629508 from trunk:

mod_cache_socache: Change average object size

hint from 32 bytes to 2048 bytes.

Submitted by: rjung

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1629507, r1629652 from trunk:

mod_cache_socache: Add cache status to server-status.

The status_hook simply calls the status function of

socache, very much like mod_ssl does for the ssl

session cache.

Silence build warning about missing prototype.

Followup to r1629507.

Submitted by: rjung

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1572905, r1595305, r1597182, r1586827, r1534892, r1563193, r1597639 from trunk:

core: avoid a double apr_time_now() call on the first succeeding read.

* Correctly escape user provided data.

PR: 56532

Submitted by: Maksymilian <max cert.cx>

Reviewed by: rpluem

Save a few bytes of memory. This can be done in temp_pool.

Fix layout

don't pass uninitialized rv passed to ap_log_rerror()

(rv wasn't interesting / follow an existing example)

stop throwing away a pointer on the heap

(clang scan-build)

add the URI to DEBUG message 00765 (and drop an exclamation point):

Cache provider's store_body failed!

Doxygen fix + reorg to match how other header files are built

Submitted by: ylavic, rpluem, jailletc36, jailletc36, trawick, covener, jailletc36

Reviewed/backported by: jim

  1. … 8 more files in changeset.
Multiple backports from trunk:

- rotatelog: Factor out from doRotate, main; make error handling consistant

and print the actual error to stderr

PR 45084

Backport of r1374247 from trunk.

- rotatelog: Cleanups, no functional change. Drop revision history,

"svn log" works; use APR_PATH_MAX; constify more

Backport of r1409800 from trunk.

- rotatelog: error[120] is already defined in this function. Just use

it instead of shadowing.

Backport of r1416121 from trunk.

- rotatelog: Use apr_snprintf(... "%pm"...) instead of explicit call

to apr_strerror

Backport of r1463736 from trunk.

- mod_deflate: style fix (no code change)

Backport of r1499679 from trunk.

- mod_socache_shmcb: Correct the use of the printf formatter.

Backport of r1493925 from trunk.

- mod_cache_socache: Fixed signed<->unsigned compiler warning.

Backport of r1490550 from trunk.

- mod_ssl: add missing space between directive description and syntax

Backport of r1509983 from trunk.

- mpm/winnt: style consistency in winnt's worker_main

Backport of r1520760 from trunk.

Proposed by: jailletc36

Reviewed by: jim, rjung

  1. … 7 more files in changeset.
Merge r1492663 from trunk:

mod_cache_socache: Make sure the CacheSocacheMaxSize directive is merged

correctly.

Submitted by: minfrin

Reviewed/backported by: jim

  1. … 3 more files in changeset.
mod_cache_socache: Fix warning "variable 'rv' may

be used uninitialized in this function"

(which is correct here).

Backport of r1494536 form trunk.

  1. … 2 more files in changeset.
Merge r1491458 from trunk:

mod_cache_socache: Use the name of the socache implementation when performing

a lookup rather than using the raw arguments.

Submitted by: minfrin

Reviewed/backported by: jim

  1. … 3 more files in changeset.
mod_cache: Ensure that updated responses to HEAD requests don't get

mistakenly paired with a previously cached body. Ensure that any existing

body is removed when a HEAD request is cached.

trunk patch: http://svn.apache.org/r1479411

Submitted by: minfrin

Reviewed by: jim, wrowe

  1. … 5 more files in changeset.
mod_cache: Invalidate cached entities in response to RFC2616 Section

13.10 Invalidation After Updates or Deletions. PR 15868

trunk patch: http://svn.apache.org/r1070179

http://svn.apache.org/r1478140

http://svn.apache.org/r1478173

http://svn.apache.org/r1478798

2.4.x patch: http://people.apache.org/~minfrin/httpd-mod_cache-invalidate7.patch

Submitted by: minfrin

Reviewed by: jim, wrowe

  1. … 9 more files in changeset.
eol-style = native

  1. … 4 more files in changeset.
mod_cache_socache: New cache implementation backed by mod_socache

that replaces mod_mem_cache removed from httpd v2.2.

Add backported files, missed by the backport process in r1477652.

  1. … 4 more files in changeset.