1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-11 02:42:23 +03:00
Commit Graph

392 Commits

Author SHA1 Message Date
Jim Jagielski
d8a752e550 non-existance of byrequests is not an immediate error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1428916 13f79535-47bb-0310-9956-ffa450edef68
2013-01-04 15:10:21 +00:00
Jim Jagielski
74708ea8f3 Allow for searching w/i shm slots for a specific worker and balancer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421953 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 16:14:06 +00:00
Jim Jagielski
4916496398 better logging for re-use/use of shm
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407085 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 14:01:37 +00:00
Jim Jagielski
6ec40f4835 Allow for setting of sticky session split char...
Bugz 53893


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1404653 13f79535-47bb-0310-9956-ffa450edef68
2012-11-01 16:06:43 +00:00
Jim Jagielski
252eb962b5 Log whether or not the restore from shm actually
resulted in a match of shm data, or whether it
was stale.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387607 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 14:18:19 +00:00
Jim Jagielski
1c55455c36 Use identifying server_rec info when we know we have
unique and useful data :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387444 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 03:51:25 +00:00
Jim Jagielski
664dd95af2 Persist local balancer-manager changes across restart/graceful.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387110 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 12:15:50 +00:00
Jim Jagielski
6e35236028 Don't just willy nilly slurp double slashes... just handle
the end-case where a '//' is not intended (due to how
PPR is stored)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1386578 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 12:22:33 +00:00
Jim Jagielski
df145fa817 When concatting for PPR, avoid cases where we
concat ".../" and "/..." to create "...//..."

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1386576 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 12:11:45 +00:00
Jim Jagielski
beba00de80 Avoid the overhead of creating and grabbing a uuid for
the balancer nonce if we're never going to use it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383490 13f79535-47bb-0310-9956-ffa450edef68
2012-09-11 17:39:32 +00:00
Joe Orton
769ea2b074 * modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix
to skip balancer:// prefix where applicable.

Reviewed by: rjung, rpluem
PR: 45434 (regressed since 2.2)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1365479 13f79535-47bb-0310-9956-ffa450edef68
2012-07-25 07:28:26 +00:00
Joe Orton
38f42637d9 * modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Add error
handling for apr_sockaddr_ip_getbuf(), minor code style tweaks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1365029 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 13:01:13 +00:00
Joe Orton
1e73116ec5 * modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Fix memory
leak/thread-unsafe use of pconf.

Submitted by: rpluem, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1365020 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 12:54:38 +00:00
Joe Orton
6c41025260 Fix handling of ProxyBlock if a forward proxy is configured, and fix
mod_proxy_connect to avoid an inappropriate DNS lookup:

* modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Take hostname
  argument, make address argument optional.  Check names against
  hostname arg, omit if addr not given.
  (ap_proxy_determine_connection): Adjust for the above; pass hostname
  from URI not the next hop.

* modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler): Adjust for
  ap_proxy_checkproxyblock change.

* modules/proxy/mod_proxy_connect.c (proxy_connect_handler): Adjust
  similarly, and avoid the DNS lookup on the request-URI hostname if a
  proxy is used.

* include/ap_mmn.h: Bump MMN.

PR: 43697


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1365001 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 12:17:00 +00:00
Stefan Fritsch
8c960a8c15 Various code clean up
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52893 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361801 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 21:14:00 +00:00
Ruediger Pluem
e948002f96 * Add the forcerecovery balancer parameter that determines if recovery for
balancer workers without considering the retry value of workers is enforced.
  There might be cases where an already overloaded backend can get into deeper
  trouble if the recovery of all workers is enforced without considering the
  retry parameter of each worker


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1306409 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 15:22:40 +00:00
Jim Jagielski
2232c2c14b optimize this... Do strlen() ONLY if we need to check
for overflow.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1228766 13f79535-47bb-0310-9956-ffa450edef68
2012-01-08 01:40:01 +00:00
William A. Rowe Jr
33d94f3328 Cure size_t abuse, curse some recent code [recommit good bits from r1227852]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227856 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 21:50:31 +00:00
William A. Rowe Jr
07e32f24db Revert a whole mess that was not ment to be committed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227855 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 21:48:21 +00:00
William A. Rowe Jr
0d1f9f658a Cure size_t abuse, curse some recent code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227852 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 21:43:24 +00:00
Eric Covener
be417c2c1e Update the comment and checks around address/connection reusability
in mod_proxy.  

The checks and comment are a vestige of 2.0.x
mod_proxy_http where the backend proxy conn was stored in 
the frontend r->conn_config, but ap_proxy_determine_connection()
doesn't associate the frontend and backend conns like this.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227642 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 15:45:01 +00:00
Stefan Fritsch
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
Graham Leggett
411fceeda5 mod_proxy: Remove dead code ap_proxy_table_unmerge().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209952 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 17:09:58 +00:00
Graham Leggett
d404b51f31 mod_proxy: Remove ap_proxy_make_fake_req() from the public API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209916 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 14:39:51 +00:00
Graham Leggett
f2f321ff8c mod_proxy: Remove dead code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209910 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 13:38:26 +00:00
Graham Leggett
1a7b79088b mod_proxy: Make sure we populate the client IP from the peer IP for proxy
fake requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209814 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 01:08:59 +00:00
Graham Leggett
3ab3e5ed3e mod_proxy: Remove ap_proxy_date_canon() from the public API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209812 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 01:03:08 +00:00
Graham Leggett
e45341af5d mod_proxy: Remove ap_proxy_buckets_lifetime_transform() from the public API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209811 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 00:57:19 +00:00
Graham Leggett
9abaf845ca mod_proxy: Remove ap_proxy_liststr(), it duplicates ap_find_token().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209797 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 00:30:06 +00:00
Graham Leggett
a81bd8f675 mod_proxy: Move ap_proxy_string_read() out of the public API into
mod_proxy_ftp.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209776 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:18:39 +00:00
Stefan Fritsch
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
Graham Leggett
0182b1654f mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows
mod_lbmethod_bybusyness, mod_lbmethod_byrequests, mod_lbmethod_bytraffic
and mod_lbmethod_heartbeat to be loaded without mod_proxy yet being present,
which happens when modules are loaded in alphabetical order.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209754 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 22:42:39 +00:00
Jim Jagielski
1eeb516b64 Use 2 sep hashing functions to account for collisions...
Safe enough

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208897 13f79535-47bb-0310-9956-ffa450edef68
2011-12-01 00:02:30 +00:00
Jim Jagielski
619f36bf80 Ensure casing doesn't matter... (we know balancer->s->name is
lc)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208069 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 21:14:47 +00:00
Jim Jagielski
e13a723904 Some optimization... we have a hash, use it. Quicker than all
these string comparisons.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208068 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 21:14:08 +00:00
Jim Jagielski
d2e320f509 Logic which makes the balancer "active" or not... so we can turn them
off and on as needed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207926 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 15:36:11 +00:00
Jim Jagielski
ef5be92f5e Pull this out as a sep function to allow for full vhosting
adjustment between get and define balancers...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207562 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 20:11:44 +00:00
Jim Jagielski
c4ec235bb0 "Final" (I hope) proxy struct/API changes in order to support
dynamic balancer allocation AND dynamic vhost-balancers

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207467 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 17:10:17 +00:00
Jim Jagielski
b896ababf5 Error-check.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207282 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 15:11:03 +00:00
Jim Jagielski
984c3a345c Move useful and shared balancer stuff to the shm slot...
Provide hooks for post-config/runtime addition of
balancers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206286 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:28:14 +00:00
Jim Jagielski
fa862b3f7e Allow compile time changes of field sizes and be more
"clear" regarding the diff between balancer and worker slots...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206268 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 17:32:03 +00:00
Jim Jagielski
846dd30b32 Never used.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204553 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 15:51:40 +00:00
Stefan Fritsch
2bd6f96a1a Log fatal errors at level CRIT, not at some random level from DEBUG to EMERG
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203868 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:49:44 +00:00
Stefan Fritsch
8ec7f5c5bf great proxy logging cleanup:
* remove "proxy:", "FCGI", etc. prefixes and pid which are now
    included in the error log format

  * propagate frontend request's logconfig to backend request
    
  * use ap_log_rerror where possible
    
  * remove obsolete APLOG_NOERRNO


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203859 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:41:09 +00:00
Stefan Fritsch
8da8c26cd1 Modify placement of PROXY_DECLARE_DATA to fix build problems with MSVC,
reported by Gregg L. Smith


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1196946 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 05:35:51 +00:00
Stefan Fritsch
40b2bb8f92 There is absolutely no reason to have two 4k-sized constant strmatch patterns
in each per-dir config.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1183475 13f79535-47bb-0310-9956-ffa450edef68
2011-10-14 19:51:17 +00:00
Stefan Fritsch
14db7672ac Remove ap_proxy_removestr(). It has been unused for a decade and has quadratic
memory usage.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180654 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 17:07:17 +00:00
Stefan Fritsch
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
Stefan Fritsch
037e42fb4d Save one call of ap_escape_html on the uri. Reflow code to be more readable.
Submitted by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
PR: 51697


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173328 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 20:12:51 +00:00
Stefan Fritsch
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00