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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1701772 13f79535-47bb-0310-9956-ffa450edef68
With the current implementation, it is likely to connect/close a socket with the memcache server for each command sent.
The root cause is a too small idle timeout (600 microseconds).
Add a new directive, 'MemcacheConnTTL', to control this idle connection timeout with the memcache server(s).
Change the default value from 600 usec (!) to 15 sec as per Yann suggestion.
I've limited accepted values from 1 to 1800 seconds (half an hour) because internaly, the value passed to 'apr_memcache_server_create' is still in mirco-seconds.
PR 58091
~~~~~~~~~~~~~~~~~~~_
Homemade measurement (on a slighly modified version of httpd) shows a +30% in number of processed requests using memcache to cache /index.html.
Comparison made between the 600 usec and 15 sec TTL.
Memcache config:
default
httpd Config:
CacheEnable socache /
CacheSocache memcache:127.0.0.1
LoadModule mpm_event_module modules/mod_mpm_event.so
httpd compiled with:
./configure --enable-mpms-shared=all --with-included-apr --with-mysql --with-libxml2 --enable-modules=reallyall --enable-ssl-ct=no --enable-maintainer-mode --prefix=$HOME/httpd-2.5
httpd and memcache running on the same VM running under Ubuntu 15.04
Load tested using:
ab -n 20000 http://127.0.0.1/index.html
Creation/closing of connections beetween httpd and memcache confirmed using the telnet connection to memcache and the stats command
Allow 0 as a valid value (never close idle connections)
Increased maximum allowed value to 3600 s (1 hour)
Use 'ap_timeout_parameter_parse' to allow more flexible configuration (i.e. h, min, s, ms suffixes)
Use 'apr_time_from_sec' when applicable.
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1701771 13f79535-47bb-0310-9956-ffa450edef68
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1674660 13f79535-47bb-0310-9956-ffa450edef68
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1634527 13f79535-47bb-0310-9956-ffa450edef68
SECURITY (CVE-2014-3581): Fix a mod_cache NULL pointer deference
in Content-Type handling.
mod_cache: Avoid a crash when Content-Type has an empty value. PR56924.
Submitted By: Mark Montague <mark catseye.org>
Reviewed By: Jan Kaluza
Submitted by: jkaluza
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1627749 13f79535-47bb-0310-9956-ffa450edef68
don't let handlers start with r->status = 304 during a failed revalidation
PR56881
Fix typo in comment.
Submitted by: covener, rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1627745 13f79535-47bb-0310-9956-ffa450edef68
Add missing APLOGNO.
Refactor to keep APLOGNO on the same line as ap_log_error, when applicable.
Add missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1622706 13f79535-47bb-0310-9956-ffa450edef68
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1603141 13f79535-47bb-0310-9956-ffa450edef68
mod_cache: Preserve non-cacheable headers forwarded from an origin 304
response. PR 55547.
When mod_cache asks for a revalidation of a stale entry and the origin responds
with a 304 (not that stale), the module strips the non-cacheable headers from
the origin response and merges the stale headers to update the cache.
The problem is that mod_cache won't forward the non-cacheable headers to the
client, for example if the 304 response contains both Set-Cookie and
'Cache-Control: no-cache="Set-Cookie"' headers, or CacheIgnoreHeaders is used.
mod_cache: follow up to r1591328.
Define the cache_merge_headers_out() function to merge r->err_headers_out into
r->headers_out and add the ones from r->content_type/encoding if available.
Use it in ap_cache_cacheable_headers_out() where the same is done and in
cache_save_filter() where this has to be done before updating the entry.
mod_cache: follow up to r1594643.
Avoid table lookup if not necessary (fast path first).
Submitted by: ylavic
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1598604 13f79535-47bb-0310-9956-ffa450edef68
mod_socache_shmcb: Correct counting of expirations for status display.
Expirations happening during retrieval were not counted.
Submitted by: rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1595918 13f79535-47bb-0310-9956-ffa450edef68
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.
mod_cache: follow up to r1591320.
Use the new MOD_CACHE_ENTITY_HEADERS[] names to check 304 contradictions
against the same headers.
mod_cache: follow up to r1591322
Avoid one unnecessary test when checking 304 contradictions.
mod_cache: follow up to r1591390
Fix code typo.
Submitted by: ylavic
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1595916 13f79535-47bb-0310-9956-ffa450edef68
* server/protocol.c (r_flush): Use int return type as per declaration
of apr_vformatter(); no functional change.
Use %pm in order to save 8k of stack in 'ap_pcfg_strerror'
s/apr_pstrndup/apr_pstrmemdup/ when applicable
follow-up to r1096569:
remove unnecessary total_modules calculation
Submitted by: jorton, jailletc36, jailletc36, trawick
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1569726 13f79535-47bb-0310-9956-ffa450edef68
Expires in a 304 is not a contradiction in terms of r1487118:
- Expires, Cache-Control, and/or Vary, if the field-value might
differ from that sent in any previous response for the same
variant
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1560093 13f79535-47bb-0310-9956-ffa450edef68
mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size
previously limited to 64MB.
Limit SHMCB_MAX_SIZE to min(UINT_MAX, APR_SIZE_MAX) to match the current code
Submitted by: minfrin, sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1551932 13f79535-47bb-0310-9956-ffa450edef68
- 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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1528969 13f79535-47bb-0310-9956-ffa450edef68
Replace duplicate log tags
Check that AsyncRequestWorkerFactor is not negative
PR :54254
Submitted by: Jackie Zhang <jackie qq zhang gmail com>
remove unneeded include statements
Name pool + concat string at compile time when possible
* modules/filters/mod_ratelimit.c (rate_limit_filter): Log the error
code.
Correct typo in error message
Submitted by: sf, jailletc36, jorton, jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1502204 13f79535-47bb-0310-9956-ffa450edef68
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1492202 13f79535-47bb-0310-9956-ffa450edef68