1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Stefan Fritsch
a8c135f27e Add some features to ap_expr for use by mod_include:
* a restricted mode that does not allow to bypass request access restrictions
 * new variables DOCUMENT_URI (alias for REQUEST_URI), LAST_MODIFIED
 * -A as an alias for -U
 * an additional data entry in ap_expr_eval_ctx_t for use by the consumer
 * an extensible ap_expr_exec_ctx() API that allows to use that data entry


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1128564 13f79535-47bb-0310-9956-ffa450edef68
2011-05-28 07:01:47 +00:00
Stefan Fritsch
a88e191cd5 Also add the -U and -F operators for doing subrequest lookups to ap_expr.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103126 13f79535-47bb-0310-9956-ffa450edef68
2011-05-14 15:12:33 +00:00
Stefan Fritsch
17651e0c9a Add various file existance test operators to ap_expr
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103097 13f79535-47bb-0310-9956-ffa450edef68
2011-05-14 13:22:11 +00:00
Joe Orton
e8715105b8 * server/util_expr_eval.c (req_table_func): Try r->err_headers_out for
response headers if given header is not found in r->headers_out
  (e.g. as with non-standard headers from CGI scripts).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090234 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 13:13:36 +00:00
Stefan Fritsch
d489f13739 Add mod_rewrite's SCRIPT_USER/SCRIPT_GROUP vars to ap_expr
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053882 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 13:00:36 +00:00
Stefan Fritsch
0ec9bd6fdc Add -T operator to allow easy evaluation of on/off, 1/0, ... variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053865 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 11:59:02 +00:00
Stefan Fritsch
adca7b491e indentation + coding style fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1044679 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 17:16:54 +00:00
Stefan Fritsch
b93e49391b Rename ap_expr's typedef names:
ap_expr            ->  ap_expr_t
ap_expr_parse_ctx  ->  ap_expr_parse_ctx_t
ap_expr_eval_ctx   ->  ap_expr_eval_ctx_t
ap_expr_lookup_fn  ->  ap_expr_lookup_fn_t
ap_expr_node_op    ->  ap_expr_node_op_e


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042146 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 11:22:30 +00:00
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
Guenter Knauf
a4454cb0e2 Fix for picky compilers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037605 13f79535-47bb-0310-9956-ffa450edef68
2010-11-22 05:02:56 +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
b4db6ddb3e Don't compile expr_dump_tree() by default
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037325 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 20:42:57 +00:00
Stefan Fritsch
53d0129701 Check input lenght to avoid potential overflows
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037321 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 20:26:37 +00:00
Stefan Fritsch
c40fa87ce7 Log errors/infos during expression evaluation and associate the message
with the module that is calling ap_expr_exec()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037140 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:59:50 +00:00
Stefan Fritsch
86508e66ab support error log id as variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033167 13f79535-47bb-0310-9956-ffa450edef68
2010-11-09 19:24:45 +00:00
Stefan Fritsch
b6aec76bc1 Support %{HANDLER} in ap_expr (required for mod_filter)
Update mod_filter docs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032413 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 22:53:59 +00:00
Stefan Fritsch
6056703807 Implement "reqenv", "note", "-z", "-n" in ap_expr.
Make "env" ssl_expr compatible


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032408 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 22:06:33 +00:00
Stefan Fritsch
29d566dd9b Port "file" function from ssl_expr
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032393 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 21:09:19 +00:00
Stefan Fritsch
94c5270ab5 More fixes for picky compilers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032268 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 13:00:00 +00:00
Stefan Fritsch
bed44770b5 Implement "HTTPS" and "IPV6" vars in ap_expr
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032170 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:21:46 +00:00
Stefan Fritsch
50efd54644 Netware build fixes
Submitted by: NormW <normw gknw net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032163 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 21:47:39 +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