df23b8a678
revert
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726057 13f79535-47bb-0310-9956-ffa450edef68
2016-01-21 18:41:21 +00:00
e0318bf236
expand and err-check...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725766 13f79535-47bb-0310-9956-ffa450edef68
2016-01-20 17:54:38 +00:00
05a31cb629
Just in case...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725762 13f79535-47bb-0310-9956-ffa450edef68
2016-01-20 17:37:19 +00:00
b0ba54040b
ap_expr now allows kept_body() function to grab/use
...
response body if stored in r->kept_body
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725755 13f79535-47bb-0310-9956-ffa450edef68
2016-01-20 16:58:04 +00:00
0eddea67ac
Added some more log numbers to log statements that
...
had none.
Those were not detected by the coccinelle script.
Only a few hard cases are remaining now.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725548 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 15:43:17 +00:00
4bfe0a6bba
Follow up to r1715880: revert more abusive ap_casecmpstr[n]() usages.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722150 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 15:32:27 +00:00
7e96ac17cf
Use 'ap_array_str_contains' to simplify code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719255 13f79535-47bb-0310-9956-ffa450edef68
2015-12-11 04:40:20 +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
a58cc8eef0
reverting unwanted loss of missing case
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702954 13f79535-47bb-0310-9956-ffa450edef68
2015-09-14 13:57:09 +00:00
ea390af213
httpd compiles warning free on gcc and every new warning will be treated as an error, standard c-89 is enforced
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702948 13f79535-47bb-0310-9956-ffa450edef68
2015-09-14 13:29:35 +00:00
7439a429d6
Expression parser: Optimize another concatenation
...
case by using iteration instead of recursion.
We have a relatively small recursion limit of
about 10 operations. This is a compilation
limit (a define). It can be hit if many expr
vars or function calls are concatenated.
The new optimization is very similar to the
existing one, which optimizes consecutive
concatenations in node2 of the tree. The new
one optimizes consecutive concatenations in
node 1.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657685 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 20:33:59 +00:00
829e98c57d
looks like debug left in r1642154
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647125 13f79535-47bb-0310-9956-ffa450edef68
2014-12-21 11:47:26 +00:00
ddc48bf250
* Correctly indent
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643220 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 10:02:57 +00:00
f1d7ed9cde
ap_expr: Add filemod function for checking file modification times.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643145 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 00:46:33 +00:00
529b4906a6
* ap_expr: Fix replace() func when length of "from" != length of "to".
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643094 13f79535-47bb-0310-9956-ffa450edef68
2014-12-03 11:10:50 +00:00
bd41584fcb
* ap_exr: Add replace(string, from, to) function.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1642154 13f79535-47bb-0310-9956-ffa450edef68
2014-11-27 13:46:11 +00:00
268e463e27
tab vs space
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1633528 13f79535-47bb-0310-9956-ffa450edef68
2014-10-22 05:22:09 +00:00
2785b009e9
Silent some cppcheck warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621806 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 14:40:01 +00:00
089d2e0373
Do not use deprecated define.
...
No change in generated code because MODULE_MAGIC_NUMBER is defined as:
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611871 13f79535-47bb-0310-9956-ffa450edef68
2014-07-19 09:46:20 +00:00
80e41b5819
Tweak a AP_DEBUG_ASSERT condition.
...
Valid index to use 'req_header_var_names' are 0...6
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595321 13f79535-47bb-0310-9956-ffa450edef68
2014-05-16 19:37:07 +00:00
1c88c53282
Only include the ldap escaping if present within APR.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589995 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 11:19:56 +00:00
7c05d5e069
Add the ldap function to the expression API, allowing LDAP filters and
...
distinguished names based on expressions to be escaped correctly to
guard against LDAP injection.
Note: this requires at least APR v1.6.0 or above for the apr_escape API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589986 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 10:55:04 +00:00
a3dca551c1
Move two variable assignments off the fast path.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588448 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 11:47:06 +00:00
2f358e7e17
add md5 function, too
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458004 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 21:16:18 +00:00
bbf4902d58
simplify code by using ap_bin2hex()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458003 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 21:13:31 +00:00
3140d79ef9
Expression parser: use hex encoding for the sha1 hash.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1457610 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 00:27:38 +00:00
5d47953112
Remove the comment, this is done.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1457520 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 19:10:01 +00:00
c0c5f9db2a
Expression parser: Add the ability to apply a SHA1 hash to strings within
...
the parser.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1457450 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 13:52:58 +00:00
cc78b3134b
Expression parser: Add the ability to base64 encode and base64 decode
...
strings within the parser.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1457437 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 12:49:27 +00:00
4aad88eb93
Add SERVER_PROTOCOL_VERSION, SERVER_PROTOCOL_VERSION_MAJOR,
...
SERVER_PROTOCOL_VERSION_MINOR ap_expr variables.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410755 13f79535-47bb-0310-9956-ffa450edef68
2012-11-17 17:43:33 +00:00
6c8ea86f41
ap_expr: Add req_novary function that allows HTTP header lookups
...
without adding the name to the Vary header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1403483 13f79535-47bb-0310-9956-ffa450edef68
2012-10-29 20:34:18 +00:00
76f782e188
Various code cleanup to avoid compiler, cppcheck, or clang warnings:
...
modules/debugging/mod_firehose.c: Make some internal functions static
(to do: logs_cleanup() is unused)
modules/filters/mod_charset_lite.c: Remove dead assignments
modules/filters/mod_include.c: likewise
modules/metadata/mod_usertrack.c: likewise
modules/proxy/mod_proxy_ftp.c: likewise
modules/ssl/ssl_engine_pphrase.c: likewise
modules/proxy/mod_proxy_balancer.c: likewise;
Remove NULL check that can never happen
modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
would, it would just mask another bug
os/unix/unixd.c: likewise
modules/http/http_filters.c: Remove sub-condition that is always true
modules/lua/mod_lua.c: Add default cases to switch statements
modules/generators/mod_autoindex.c: Unsigned value can never be < 0
server/util_expr_eval.c: Fix compiler warnings with VC and on OS2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1220493 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 17:52:59 +00:00
cb21a0dbcc
Further clarify the naming of the entity that directly connects to us by
...
calling that entity a client instead of a peer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
ad489c105b
Further clarify the naming of the entity that originates the request by
...
calling that entity a useragent instead of a client.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214005 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:33:46 +00:00
e6d1031885
Explicitly cast function pointer, to remove 'const'.
...
Hopefully this makes the NetWare compiler happy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1213567 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 05:53:50 +00:00
e0a5a7882e
Fix names of unary operators like '-s' being compared case insensitively.
...
Improve error message if op or function is not found. Document '-s' operator.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1212883 13f79535-47bb-0310-9956-ffa450edef68
2011-12-10 21:26:00 +00:00
0f05cbe719
Fix a few compiler warning reported by Steffen:
...
- some signed/unsigned mismatches
- const for a function does not make sense
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210378 13f79535-47bb-0310-9956-ffa450edef68
2011-12-05 09:38:44 +00:00
26d5fb7164
Add some more log message tags
...
Remove some log message tags from ap_log_* calls that log lots of
different error messages, in particular the config parsing errors.
Not sure how we should handle those.
ssl_util.c: Downgrade some dynamic locking messages from level DEBUG
to TRACE1-3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210252 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 22:09:24 +00:00
92e366007c
Add lots of unique tags to error log messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
394e5594d6
Introduce a per connection "peer_ip" and a per request "client_ip" to
...
distinguish between the raw IP address of the connection and the effective
IP address of the request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
f94cf9a7f0
Hello. Let's compile again.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204998 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 14:02:25 +00:00
7df4fb3537
Add the ability to access the connection level remote IP address from the
...
expression parser.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204990 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:40:58 +00:00
4ee7eea4cf
Introduce a per request version of the remote IP address, which can be
...
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
294efcbd32
clarify comment
...
remove broken recursion counting bits
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204090 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 22:06:16 +00:00
92663b1e32
Limit recursion in ap_expr evaluation to avoid unbounded stack usage
...
* evaluate chains of ||, &&, and string concatenation non-recursively
* limit other types of recursion to 20 levels
* avoid some string copies if concatenating more than 2 strings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204087 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 21:58:48 +00:00
02302c9049
regex related cleanups:
...
- use AP_MAX_REG_MATCH where appropriate
- in mod_proxy_ftp, compile the "ls -s1" regex only once instead of once per request
- add some coments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185898 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 22:02:26 +00:00
1951a037bf
More cleanup: Expand tabs and some more indentation fixes
...
No functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
427c85bd23
Cleanup effort in prep for GA push:
...
Trim trailing whitespace... no func change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00