1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

1386 Commits

Author SHA1 Message Date
Stefan Fritsch
e27a3c21e3 - add -ipmatch, -str(c)match, -fnmatch, -R operators to ap_expr
- allow lookup function to pre-parse string constant arguments 
  (used for subnet masks so far)
- various bug fixes for binary operators
- do strdup() for error messages created on the stack to avoid corruption


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039900 13f79535-47bb-0310-9956-ffa450edef68
2010-11-28 16:35:14 +00:00
Stefan Fritsch
c409988d42 Fix another Windows build issue: Add a wrapper around ap_run_expr_lookup with
the correct calling convention.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039528 13f79535-47bb-0310-9956-ffa450edef68
2010-11-26 19:32:13 +00:00
Stefan Fritsch
cf0e2c3a46 Fix some Windows build issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039204 13f79535-47bb-0310-9956-ffa450edef68
2010-11-25 22:27:17 +00:00
Jim Jagielski
cabf0280ee Roll on .10
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1038144 13f79535-47bb-0310-9956-ffa450edef68
2010-11-23 14:43:27 +00:00
Jim Jagielski
eb169b42e8 Get ready for tagging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1038141 13f79535-47bb-0310-9956-ffa450edef68
2010-11-23 14:37:23 +00:00
Stefan Fritsch
b6649687a3 More ap_expr updates:
- minor bump for ap_expr_exec_re() introduced in r1037504
- actually commit the changes to allow using backreferences in SetEnvIfExpr
- automatically add the correct entries to the Vary-header if the result of
  an expression evaluation depends on a request header
  (can be turned off by setting the AP_EXPR_FLAGS_DONT_VARY flag)
- set AP_EXPR_FLAGS_DONT_VARY in mod_log_config's conditional logging
- fix various off-by-one errors in req_table_func


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037540 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 19:51:41 +00:00
Stefan Fritsch
6ef1911acc ap_expr related fixes/enhancements:
- implement regex backreferences and make them available for setting 
  envvars in SetEnvIfExpr
- implement nested function calls in %-syntax: %{func1:%{func2:arg}} 
- actually implement evaluation of concatenation operator (oops...)
- Fix <If ... > treating an internal error as success


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037504 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 17:22:26 +00:00
Stefan Fritsch
39db8e5413 mod_proxy: Fix ProxyPassInterpolateEnv directive.
PR: 50292


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036602 13f79535-47bb-0310-9956-ffa450edef68
2010-11-18 20:15:24 +00:00
Graham Leggett
807be6db70 Revert r1035504, this was the wrong way to do it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035576 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 10:27:26 +00:00
Graham Leggett
38437740bb Fix pool lifetime issues when the proxy backend connection is terminated
early by forcing a setaside on transient buckets placed in the brigade
by mod_ssl. This has the effect of extending the lifetime of buckets until
the end of the request. This is a variation on the original fix for this
problem, which added transient buckets to be setaside later in the process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035504 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 00:23:37 +00:00
Nick Kew
3bad5b1780 Fix mod_proxy to support setting source address.
PR 29404
Seems lots of users want this, and a couple of them have recenly asked nicely


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1034916 13f79535-47bb-0310-9956-ffa450edef68
2010-11-14 00:01:43 +00:00
Jeff Trawick
d4d90bdf0a suEXEC: Add Suexec directive to disable suEXEC without renaming the
binary (Suexec Off), or force startup failure if suEXEC is required
but not supported (Suexec On).  Change SuexecUserGroup to fail 
startup instead of just printing a warning if suEXEC is disabled.

Additionally, ap_unixd_config.suexec_disabled_reason has a message,
suitable for logging/messaging, explaining why the feature isn't
available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033519 13f79535-47bb-0310-9956-ffa450edef68
2010-11-10 15:34:43 +00:00
Ruediger Pluem
38064564e9 * Fix parameter name as new is a reserved word in C++ which makes compiling
of http_config.h with C++ impossible.

PR: 50243


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033427 13f79535-47bb-0310-9956-ffa450edef68
2010-11-10 12:09:27 +00:00
Daniel Earl Poirier
dbd0f3d74a Tweak some doxygen comments to get these functions to show up in
the right places in the generated doc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032275 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 13:36:48 +00:00
Stefan Fritsch
0d6be9186d Ooops. Forgot the minor bump for r1032167
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032168 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:14:12 +00:00
Stefan Fritsch
286c8622b6 Add a generic pool cleanup function that sets a pointer to NULL and use
it to replace various pool cleanup functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032167 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:12:41 +00:00
Stefan Fritsch
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00
Stefan Fritsch
f73cbb7949 Clarify usage of ap_pregcomp/ap_pregfree
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026642 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 16:38:03 +00:00
Stefan Fritsch
b7e357db7e Actually bump MMN for:
* 20101017.0 (2.3.9-dev)  Make ap_cache_control() public, add cache_control_t
 *                         to mod_disk_cache format.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024357 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 18:56:34 +00:00
Graham Leggett
b4ecd74a9e As cache_control_t is public, make ap_cache_control() public with it. Bump
the MMN for addition of ap_cache_control(), and the addition of cache_control_t
to the disk format.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023397 13f79535-47bb-0310-9956-ffa450edef68
2010-10-17 00:59:44 +00:00
Graham Leggett
796d4cd074 Begin the process of optimising the parsing of Cache-Control headers. Parse
the incoming Cache-Control and Pragma headers once, instead of on each test.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023360 13f79535-47bb-0310-9956-ffa450edef68
2010-10-16 19:30:08 +00:00
Rainer Jung
147ef0da31 Fix constness in log macro.
Prevent compiler warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023026 13f79535-47bb-0310-9956-ffa450edef68
2010-10-15 17:17:15 +00:00
Stefan Fritsch
8b3bdbc602 improve docs for ap_errorlog_handler and ap_errorlog_info
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021902 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 19:59:09 +00:00
Graham Leggett
0f267cd6ad mod_cache: Optionally serve stale data when a revalidation returns a
5xx response, controlled by the CacheStaleOnError directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021546 13f79535-47bb-0310-9956-ffa450edef68
2010-10-11 23:32:56 +00:00
Stefan Fritsch
049ba34b53 core: Speed up config parsing if using a very large number of config
files

PR: 50002
Submitted by: andrew cloudaccess net


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1003808 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 14:44:20 +00:00
Stefan Fritsch
037096d129 add comment about change to ap_expr_eval()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002571 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29 10:34:07 +00:00
Nick Kew
6ed93282a7 Add "IN" operator to expression parser, to evaluate membership of
a list of tokens.  Couldn't resist after sf's comment on r1002363!

This means expressions like
<If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS,...>
will work as a drop-in substitute for <Limit>

Also fix off-by-one bug in variable evaluation


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002415 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 23:26:44 +00:00
Stefan Fritsch
a10a4e4f2f This is just too easy to not do it: Add an 'expr' authz provider that allows
arbitrary expressions in Require lines.

The main issue I wanted to fix was that the env provider only allows to
check for the existance of an envvar but not the contents.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002363 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 21:33:44 +00:00
Stefan Fritsch
b65066c6ac Add generate_log_id hook to allow to use the ID generated by mod_unique_id as
error log ID for requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002125 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 11:53:17 +00:00
Graham Leggett
61b7c8574b mod_cache: Add the cache_status hook to register the final cache
decision hit/miss/revalidate. Add optional support for an X-Cache
and/or an X-Cache-Detail header to add the cache status to the
response. PR48241


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001639 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 09:20:40 +00:00
Stefan Fritsch
107c5573e1 In ErrorLogFormat, make it possible to log an item only if the loglevel
of the message is higher than a specified value. This allows to achive
the old behaviour for the source file name/line number of being only
logged for debug and higher.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001381 13f79535-47bb-0310-9956-ffa450edef68
2010-09-26 07:40:15 +00:00
Graham Leggett
d621ffcc8c Bump the MMN to take into account changes to the mod_cache API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1000256 13f79535-47bb-0310-9956-ffa450edef68
2010-09-22 22:02:33 +00:00
Graham Leggett
c8de96f357 Move private cache_* declarations out of the public mod_cache.h file.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999681 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 22:55:22 +00:00
Graham Leggett
2b0f61991b Add an MMN bump for create_entity in mod_cache.h.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999633 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 20:51:05 +00:00
Nick Kew
7ce8126f31 Minor MMN bump for ap_rxplus API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999607 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 20:31:31 +00:00
Nick Kew
d4963eadb1 Introduce ap_rxplus class: higher-level regexps supporting perl-style
regexp operations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999533 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 18:42:20 +00:00
Stefan Fritsch
1008c27260 Allow authz providers to check args while reading the config and allow
them to cache parsed args.

Use this to check that argument to 'all' provider is 'granted' or 'denied'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998706 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 17:55:47 +00:00
Graham Leggett
742123230f mod_include: Move the request_rec within mod_include to be
exposed within include_ctx_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998701 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 17:11:45 +00:00
Nick Kew
a66f25dc13 Fix to apidoc comments in ap_regex
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@997560 13f79535-47bb-0310-9956-ffa450edef68
2010-09-16 01:44:09 +00:00
Graham Leggett
ca9d2ae938 mod_cache: Add a discrete commit_entity() provider function within the
mod_cache provider interface which is called to indicate to the
provider that caching is complete, giving the provider the opportunity
to commit temporary files permanently to the cache in an atomic
fashion. Move all "rename" functionality of temporary files to permanent
files within mod_disk_cache from ad hoc locations in the code to the
commit_entity() function. Instead of reusing the same variables for
temporary file handling in mod_disk_cache, introduce separate discrete
structures for each of the three cache file types, the headers file,
vary file and data file, so that the atomic rename of all three file
types within commit_entity() becomes possible. Replace the inconsistent
use of error cleanups with a formal set of pool cleanups attached to
a subpool, which is destroyed on error.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@997545 13f79535-47bb-0310-9956-ffa450edef68
2010-09-16 00:05:14 +00:00
Graham Leggett
665426645e mod_cache: Change the signature of the store_body() provider function
within the mod_cache provider interface to support an "in" brigade
and an "out" brigade instead of just a single input brigade. This
gives a cache provider the option to consume only part of the brigade
passed to it, rather than the whole brigade as was required before.
This fixes an out of memory and a request timeout condition that would
occur when the original document was a large file. Update the
mod_disk_cache provider implementation to take into account the new API.
Introduce CacheReadSize and CacheReadTime directives to mod_disk_cache
to control the amount of data to attempt to cache before sending the
data on to the client in the "out" brigade.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@996395 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 23:16:49 +00:00
Graham Leggett
aa7b4c0435 Minor bump for ap_cache_check_allowed().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@996311 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 13:45:16 +00:00
Stefan Fritsch
fb36cd8585 add comment about (not) using pools in error log format handlers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@996306 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 12:52:48 +00:00
Stefan Fritsch
70be0f7a07 Add ErrorLogFormat directive for configuring the error log format, including
additional information that is logged once per connection or request.

Add error log IDs for connections and request to allow correlating error log
lines and the corresponding access log entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992806 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 15:44:19 +00:00
Stefan Fritsch
a0e0e585b0 Disable sendfile by default, as discussed at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201007.mbox/<4C4355EE.2060605@rowe-clan.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992689 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 21:53:06 +00:00
Guenter Knauf
6dfc1d4132 Fixed wrong comment.
ap_body_to_table() was dropped with r953203, not ap_args_to_table().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@991592 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 16:27:14 +00:00
Stefan Fritsch
ca8ee159b0 - add more comments explaining the logging macros
- make the documentation more doxygen friendly, as suggested by Justin
  Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@989377 13f79535-47bb-0310-9956-ffa450edef68
2010-08-25 21:29:41 +00:00
Jim Jagielski
f4dec0256e Bump up for 2.3.9-dev
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988618 13f79535-47bb-0310-9956-ffa450edef68
2010-08-24 16:35:26 +00:00
Jim Jagielski
3972cd1b1f Get ready to tag
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988616 13f79535-47bb-0310-9956-ffa450edef68
2010-08-24 16:33:37 +00:00
Stefan Fritsch
8f840cb763 core: Abort with sensible error message if no or more than one MPM is
loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987806 13f79535-47bb-0310-9956-ffa450edef68
2010-08-21 18:06:41 +00:00