Graham Leggett
e81ec38c9c
mod_proxy: Use a global mutex for handling workers.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482859 13f79535-47bb-0310-9956-ffa450edef68
2013-05-15 14:13:15 +00:00
Graham Leggett
d21bdf4dea
mod_proxy: Make sure we skip empty tokens when parsing the Connection
...
header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482555 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 20:16:59 +00:00
Graham Leggett
9bc9d79079
core: Stop the HTTP_IN filter from attempting to write error buckets
...
to the output filters, which is bogus in the proxy case. Create a
clean mapping from APR codes to HTTP status codes, and use it where
needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482522 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:58:06 +00:00
Guenter Knauf
e929fb1ee5
hunk 1: C89 please;
...
hunk 2: optional functions are usually declared static.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482170 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 01:53:53 +00:00
Graham Leggett
d2e6782ea7
mod_proxy, mod_proxy_http: Connection headers must be stripped on the way
...
in and out, support an optional function to handle this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482075 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:11:36 +00:00
Graham Leggett
e4c442a46f
mod_proxy: Ensure we don't attempt to amend a table we are iterating
...
through, ensuring that all headers listed by Connection are removed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481891 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 14:45:49 +00:00
Jim Jagielski
d7c8ba3992
Mod_proxy used the global pool w/o mutex. fix.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1480627 13f79535-47bb-0310-9956-ffa450edef68
2013-05-09 13:33:02 +00:00
Graham Leggett
a7fc0f013e
mod_proxy: Ensure network errors detected by the proxy are returned as
...
504 Gateway Timout as opposed to 502 Bad Gateway, in order to be
compliant with RFC2616 14.9.4 Cache Revalidation and Reload Controls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1480058 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 20:27:37 +00:00
Ruediger Pluem
f707141760
* Always try to reuse the address looked up for the worker if we are allowed to
...
reuse the address. This saves DNS lookups.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463455 13f79535-47bb-0310-9956-ffa450edef68
2013-04-02 09:18:01 +00:00
Ruediger Pluem
43fdfc96cd
* Improve reusage of already resolved addresses to avoid unnecessary DNS lookups.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1462269 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 19:36:03 +00:00
Jim Jagielski
e87a822dc1
message tag for dom sock
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1453981 13f79535-47bb-0310-9956-ffa450edef68
2013-03-07 17:50:47 +00:00
Jim Jagielski
2bea7fb2bf
Pull out duplicated code to proxy_util...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1453875 13f79535-47bb-0310-9956-ffa450edef68
2013-03-07 14:06:51 +00:00
Jim Jagielski
b6cdb032b3
apr trunk-able
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452259 13f79535-47bb-0310-9956-ffa450edef68
2013-03-04 11:26:17 +00:00
Guenter Knauf
f9b2fedce6
Follow-up to r1451905 to fix NetWare/Windows compilation.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451921 13f79535-47bb-0310-9956-ffa450edef68
2013-03-02 19:17:14 +00:00
Jim Jagielski
a641aa24e7
Make AF_UNIX aware... fix Windows/Netware??
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451905 13f79535-47bb-0310-9956-ffa450edef68
2013-03-02 17:07:23 +00:00
Jim Jagielski
f5f921a2f2
Add in rough uds support (Bugx 54101) from Blaise Tarr <blaise.tarr@gmail.com>
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451633 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 16:21:49 +00:00
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