Commit Graph

649 Commits

Author SHA1 Message Date
8d0889252c Synch style in comment with 2.4.x.
Style was different when r1496711  has been backported in r1772331

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789002 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 20:06:31 +00:00
97c9589568 Group bit field values in order to save some memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789000 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:52:43 +00:00
2cd566b817 Improve indentation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788998 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:49:58 +00:00
8533abfc41 Save a few cycles.
'apr_pstrcatv' can compute the length of the new string for us.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788996 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:48:19 +00:00
fb5baf3b81 mod_cache: Fix a regression in 2.4.25 for the forward proxy case by
computing and using the same entity key according to when the cache
checks, loads and saves the request.  PR 60577.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783842 13f79535-47bb-0310-9956-ffa450edef68
2017-02-21 08:20:45 +00:00
a309dd8ef3 Remove a useless break + tiny style fix (missing space)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777557 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 09:59:32 +00:00
6976db2d38 Use apr_pstrmemdup instead of apr_pstrndup when applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777556 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 09:56:53 +00:00
332211a25c mod_socache_redis also uses mod_status hooks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774655 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 19:43:16 +00:00
3e3b82a036 related to http://svn.apache.org/viewvc?view=revision&revision=1774602
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774610 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 15:04:21 +00:00
517ad45470 Add ../generators to include path for Windows
build of mod_socache_memcache. It now needs
mod_status.h.

Untested but exactly analogous to what works for
mod_socache_shmcb and others.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774609 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 15:00:06 +00:00
9ffa25af4b Use correct format pattern, "%lu" is wrong for
apr_uint64_t on some platforms.

Followup to r1649491.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774602 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 14:43:06 +00:00
c53918d6e2 html elements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774018 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 14:04:40 +00:00
309678648f From Norm:
NWGNUsocachmem needs to find mod_status.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1770828 13f79535-47bb-0310-9956-ffa450edef68
2016-11-22 12:22:31 +00:00
f8b4fe0fa0 Fix some HTML tags
</br> --> <br />

Couls also be <br> or <br/> but some (very) old clients don't like it.
httpd is not really consistent on it. (personnlaly <br> would be just fine for me but <br /> is the most commonly used form)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769737 13f79535-47bb-0310-9956-ffa450edef68
2016-11-15 06:42:48 +00:00
8c7355d3c3 reorganize mod_socache_redis so it compiles w/o apr-redis
It looks like this was the original intent. The provider
is not registered if apr-redis is missing.

It was previously failing to compile due to the dirconf being
hidden behind the #ifdef guard but not the routine module
code that used it.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769712 13f79535-47bb-0310-9956-ffa450edef68
2016-11-15 03:15:15 +00:00
bcfb765174 heh... bring memcache up to redis :)
mod_status info

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768245 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 16:47:43 +00:00
21083eccdb Needs LOGNO #s
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768225 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:47:17 +00:00
60833dccde And provide some nice usage stats. Could be prettier, for sure.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768120 13f79535-47bb-0310-9956-ffa450edef68
2016-11-04 23:06:08 +00:00
8b5ea8fdef And the socache provider interface for Redis
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768070 13f79535-47bb-0310-9956-ffa450edef68
2016-11-04 17:04:28 +00:00
42ac649538 mod_cache: follow up to r1756553: log the real/actual cached URI (debug).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756631 13f79535-47bb-0310-9956-ffa450edef68
2016-08-17 13:22:20 +00:00
0370f02651 mod_cache: Use the actual URI path and query-string for identifying the
cached entity (key), such that rewrites are taken into account when
running afterwards (CacheQuickHandler off).  PR 21935.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756553 13f79535-47bb-0310-9956-ffa450edef68
2016-08-16 21:48:09 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
f4cc76ee71 Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:06:42 +00:00
aeb3a649b8 Fix missing limits.h header, required for 2.4.next release,
masked on many platforms by intrinsic limits.h inclusion by
other headers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736243 13f79535-47bb-0310-9956-ffa450edef68
2016-03-22 20:06:32 +00:00
c9c90fca19 better s-maxage support
+  *) mod_cache: Consider Cache-Control: s-maxage in expiration
+     calculations.  [Eric Covener]
+
+  *) mod_cache: Allow caching of responses with an Expires header
+     in the past that also has Cache-Control: max-age or s-maxage.
+     PR55156. [Eric Covener]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726675 13f79535-47bb-0310-9956-ffa450edef68
2016-01-25 19:57:33 +00:00
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
bcbfbe4ace 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> 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721899 13f79535-47bb-0310-9956-ffa450edef68
2015-12-28 12:09:29 +00:00
d965bf637f disk_cache: improve logging of errors around reading stored headers
-- add RV and print cache filename from caller.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721210 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 16:38:51 +00:00
aa543e759a remove dead code leftover from r1023387.
Prior to this revision, there was an apr_atoi64 in this context.
Now, ap_cache_control() sets control.max_age (which is checked here) when
the maxage value was parsed OK.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1718496 13f79535-47bb-0310-9956-ffa450edef68
2015-12-07 23:43:01 +00:00
78d0543c4e duplicate debug-level AH00764 in the just-validated path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1718476 13f79535-47bb-0310-9956-ffa450edef68
2015-12-07 21:41:38 +00:00
dcb95434f9 Follow up to r1715876: fix typo.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715938 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 20:05:16 +00:00
ae2e62b5b2 mod_cache: Fix (max-stale with no '=') and enforce (check integers after '=')
Cache-Control header parsing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715886 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 17:01:19 +00:00
e30575b0b0 More ap_casecmpstr[n]() usages (follow up to r1715876).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715880 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:48:35 +00:00
c80e6b2a34 Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:46:01 +00:00
3c9ddf44bf Revert r1715789: will re-commit without spurious functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
29843dc73f Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
[Reverted by r1715869]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
f3de5dcfe6 Remove some useless 'return' statements.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715567 13f79535-47bb-0310-9956-ffa450edef68
2015-11-21 20:42:39 +00:00
46b3048bd6 RFC2616 defines #rules as:
#rule
      A construct "#" is defined, similar to "*", for defining lists of
      elements. The full form is "<n>#<m>element" indicating at least
      <n> and at most <m> elements, each separated by one or more commas
      (",") and OPTIONAL linear white space (LWS). This makes the usual
      form of lists very easy; a rule such as
         ( *LWS element *( *LWS "," *LWS element ))
      can be shown as
         1#element

It also defines Linear White Space (LWS) as:
   LWS            = [CRLF] 1*( SP | HT )


The actual implementation only accepts SP (Space) and not HT (Horizontal Tab) when parsing cache related header fields (i.e. "Vary", "Cache-Control" and "Pragma")

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710723 13f79535-47bb-0310-9956-ffa450edef68
2015-10-27 06:45:03 +00:00
d6ed470b92 m4: please any autoconf by quoting AC_DEFUN's names. PR 58126.
Submitted by: olli hauer <ohauer gmx.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706918 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 20:52:51 +00:00
68131d85a4 Fix some style issues on files that can easily be synch'ed with 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 08:35:35 +00:00
b2a5a379fc not sure how that got in there
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1704395 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 19:19:54 +00:00
938a1c7470 Stop destroying headers when passing through the cache filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1704392 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 19:15:47 +00:00
6930a7b64d 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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700418 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 08:23:01 +00:00
fcae67eba7 Remove useless line
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700328 13f79535-47bb-0310-9956-ffa450edef68
2015-08-31 20:17:38 +00:00
8a804d09ba Silence a sparse warning about inconsistent indenting + some minor style issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700326 13f79535-47bb-0310-9956-ffa450edef68
2015-08-31 20:13:30 +00:00
a369776b21 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



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1696105 13f79535-47bb-0310-9956-ffa450edef68
2015-08-15 22:05:08 +00:00
d61f860de7 remove space after \
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1694936 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 00:09:58 +00:00
e66086d310 Add include path for NetWare build.
Submitted by: normw gknw net.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1694903 13f79535-47bb-0310-9956-ffa450edef68
2015-08-09 20:02:02 +00:00
85f20cb5d2 s/the the/the/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690120 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 16:01:56 +00:00
a8e498ba54 Followup to r1671397 so these will build
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677096 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 04:09:02 +00:00