1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

672 Commits

Author SHA1 Message Date
Nick Kew
047253e8a8 PR#38448: don't URLencode tilde in path component
On reflection, this patch makes sense (since the URL spec got updated), and it's trivial.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429879 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:27:25 +00:00
Nick Kew
537844367d Fix style (indentation at least) to apache style rules before reviewing top of this.
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429875 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:18:23 +00:00
Mladen Turk
9bbf36995e Cleanup: Remove close_on_recycle from proxy_conn_rec.
It behaves the same as close.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427959 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 12:03:42 +00:00
Mladen Turk
0658003dba Cleanup: Remove checking for pre 2.0.46 MMN. It is
obvious that the new mod_proxy will never be
backported to the 2.0 branch.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427055 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 09:33:28 +00:00
Nick Kew
346c6c3e76 Support environment variable interpolation in reverse proxy configuration
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421686 13f79535-47bb-0310-9956-ffa450edef68
2006-07-13 19:00:26 +00:00
Jim Jagielski
3e2c97f512 It never fails. I sit on a patch for awhile and
it's not until almost right after I commit it that
I think "hey, there's a better way to do that."
Anyway, I was never happy about the code
duplication of the primary/standby checks...
This fixes that.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421283 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 15:01:15 +00:00
Jim Jagielski
0b80babf0b Add in hot-standby balancer member. If all other members
are disabled or not-usable, ONLY THEN will the hot
standby's be used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420986 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:39:38 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Jim Jagielski
7b9391e010 Clean up some proxy macros. Avoid the use of magic
numbers, and instead use pre-defined defines. Also,
ensure that usable workers have been initialized :)

Allocate a bit for hot standbys. Adjust so that
normal "usable" workers don't count these.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420954 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 19:32:36 +00:00
Joe Orton
5c7b0ad30c * modules/proxy/proxy_util.c (ap_proxy_initialize_worker): Fix
gcc strict-aliasing warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395552 13f79535-47bb-0310-9956-ffa450edef68
2006-04-20 10:35:41 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Martin Kraemer
fcfc9fd022 Fix for platforms without threads: inreslist exists only if APR_HAS_THREADS is set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395180 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 08:56:59 +00:00
Nick Kew
381c9cec2f PR#39321 - don't segfault if a bad URL is specified in ProxyPass
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394390 13f79535-47bb-0310-9956-ffa450edef68
2006-04-15 22:45:00 +00:00
Ruediger Pluem
96c6356987 * Avoid calling ap_proxy_http_cleanup twice as this releases a connection
from the connection pool twice. This causes this connection to be present
  in the connection pool twice. Thus it may be used by different threads
  at the same time which causes many troubles (segfaults in this case).
  Furthermore implement a logic to prevent double releases to the connection
  pool if they are triggered by buggy code and log an error message in this
  case.

  - mod_proxy_http.c: remove double calls to ap_proxy_http_cleanup
  - proxy_util.c: Add logic to prevent double releases of a
    connection to the connection pool.

PR: 38793


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394088 13f79535-47bb-0310-9956-ffa450edef68
2006-04-14 13:20:28 +00:00
Ruediger Pluem
bb7b54c59f * Check for an existing socket independant of an existing connection record.
This ensures that requests handled by the '*' worker are sent to the correct
  backend server.

PR: 39253


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@392613 13f79535-47bb-0310-9956-ffa450edef68
2006-04-08 21:43:24 +00:00
Jim Jagielski
dede56b14d Document the removal of the flushing bandaid to a
runtime param. Since other protocols might benefit
from this, remove the ajp_ prefixes, to make it
more generic looking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390210 13f79535-47bb-0310-9956-ffa450edef68
2006-03-30 18:32:53 +00:00
Jim Jagielski
391472a050 Make AJP flushing admin configurable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@384580 13f79535-47bb-0310-9956-ffa450edef68
2006-03-09 18:39:16 +00:00
Jim Jagielski
d05d878779 *) mod_proxy: Fix KeepAlives not being allowed and set to
backend servers. PR38602. [Ruediger Pluem, Jim Jagielski]

Also, document previous patch:
  *) Correctly initialize mod_proxy workers, which use a
     combination of local and shared datasets. Adjust logging
     to better trace usage. PR38403. [Jim Jagielski]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@378032 13f79535-47bb-0310-9956-ffa450edef68
2006-02-15 16:44:42 +00:00
Jim Jagielski
4f1f25e0ba OK, handle better the initializing of worker, separating
"shared" and "local" inits, and being aware that if the
shared aspects are initialized, this doesn't mean
the local ones are :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377780 13f79535-47bb-0310-9956-ffa450edef68
2006-02-14 17:35:36 +00:00
Jim Jagielski
880a6ffe6b I wondered why I never saw the scoreboard init entry; now I know.
The logic flow was slightly askew.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377738 13f79535-47bb-0310-9956-ffa450edef68
2006-02-14 14:55:02 +00:00
Ruediger Pluem
6afae96259 * If a subrequest has a broken backend also set no_cache for the main request
and ensure that the chunk filter does not sent the last chunk marker in this
  case.

  modules/http/chunk_filter.c: Memorize HTTP_BAD_GATEWAY error buckets that
                               had been seen in filter context to ensure
                               that we do not sent the last chunk marker in
                               this case.
  modules/proxy/proxy_util.c : Set no_cache also for main request if we are
                               a subrequest.

  Thanks to Joe Orton and André Malo for the "invented unique pointer" trick.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366181 13f79535-47bb-0310-9956-ffa450edef68
2006-01-05 13:46:57 +00:00
Ruediger Pluem
30d205d8a9 * Correctly signal broken backend connections up the chain also for the ajp
backend (see also r357461). Furthermore move common code in mod_proxy_http.c
  and mod_proxy_ajp.c into a new function (ap_proxy_backend_broke) in
  proxy_util.c.

  modules/proxy/mod_proxy_ajp.c : Signal broken backend connection for ajp backend
  modules/proxy/proxy_util.c    : Add ap_proxy_backend_broke
  modules/proxy/mod_proxy_http.c: - Use ap_proxy_backend_broke
                                  - Return DONE also if backend broke
  modules/proxy/mod_proxy.h     : Add declaration of ap_proxy_backend_broke


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@365374 13f79535-47bb-0310-9956-ffa450edef68
2006-01-02 16:39:22 +00:00
Jim Jagielski
48904ff464 OK, while we ponder how best to reuse conn pools for workers,
clean this section up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@356030 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 21:36:27 +00:00
Jim Jagielski
48f938e0d6 Until we determine whether we should dip into the connection
pool each time, rearrange the logic to avoid a double
check which is unneeded. No matter what (if it's reusable or
not) a null conn->hostname needs to be set. At that
point it doesn't matter if we're not reusing it or
if the string comparison happens, since what we
would do in that case has already been done.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@350250 13f79535-47bb-0310-9956-ffa450edef68
2005-12-01 13:50:11 +00:00
Jim Jagielski
f518230948 Check that conn->hostname is valid before we do the string
comparison


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@350009 13f79535-47bb-0310-9956-ffa450edef68
2005-11-30 18:40:05 +00:00
Jim Jagielski
35f692c8fa Fix case where a shared keepalive connection results in
different workers from being accessed. Try to be wise and
fast about the tests before we do the expensive string
comparison.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@349723 13f79535-47bb-0310-9956-ffa450edef68
2005-11-29 15:05:16 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
6f83e0470b Move to a different impl which was my 1st concept and that which
Ruediger likes. Instead of adjusting pointers to areas
within the URL, simply copy it over and change it as needed.
Easier logic and not that much slower for normal cases.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@330085 13f79535-47bb-0310-9956-ffa450edef68
2005-11-01 16:15:09 +00:00
Jim Jagielski
9ab108491e Fix a problem where we are doing a case insensitive
match between the worker and the URL. Instead, only
the scheme and hostname are insensitive, the rest
should be case sensitive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329849 13f79535-47bb-0310-9956-ffa450edef68
2005-10-31 16:31:29 +00:00
Ruediger Pluem
00933409fe * Fix PR36906 by not lower caseing the whole worker name. Only lower case the
schema when storing the worker url. Thus preventing case sensitive URI's in
  BalancerMembers to get broken.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@328463 13f79535-47bb-0310-9956-ffa450edef68
2005-10-25 19:54:11 +00:00
Jim Jagielski
388871d089 Performance Tune: Do the cheap and fast length check before
we bother doing a char-by-char comparison. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@314881 13f79535-47bb-0310-9956-ffa450edef68
2005-10-12 13:05:59 +00:00
Jim Jagielski
3ed4f2af57 Fix -Wall warning... Thanks to Joe for the head's up!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@314875 13f79535-47bb-0310-9956-ffa450edef68
2005-10-12 13:01:25 +00:00
Jim Jagielski
be32e160ac mod_proxy_balancer: BalancerManager and proxies correctly handle
member workers with paths. PR36816. [Ruediger Pluem, Jim Jagielski]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@312963 13f79535-47bb-0310-9956-ffa450edef68
2005-10-11 21:40:32 +00:00
Ruediger Pluem
86c410c938 * Fix style nits (whitespaces / formats of comments). No Functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293301 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 10:54:34 +00:00
Jim Jagielski
fc7c61e86a de-ref bug - balancer is always not null since it's &balancer
from the caller.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@292434 13f79535-47bb-0310-9956-ffa450edef68
2005-09-29 13:59:27 +00:00
Jim Jagielski
22c5cb4728 Proxy balancer lbmethods are now registered as providers and not
via hooks. Move various find() functions back to mod_proxy_balancer
where they belong :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279752 13f79535-47bb-0310-9956-ffa450edef68
2005-09-09 12:28:02 +00:00
Jim Jagielski
da3e833d30 Restruct of lbmethod find-best algo's, bypassing hook mechanism.
Looking into provider method, but until then... Prevent core dump
when balancer not in vhosts


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279305 13f79535-47bb-0310-9956-ffa450edef68
2005-09-07 12:04:15 +00:00
Martin Kraemer
4813d8a994 Get rid of some warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232311 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 15:22:19 +00:00
Jim Jagielski
a7d488a6d2 simple, functional interface to add additional balancer lb selection methods
without requiring code changes to mod_proxy/mod_proxy_balancer;
these can be implemented via sub-modules now.

Let the games begin...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232282 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 12:47:04 +00:00
Nick Kew
ab0fd007b9 Fix mess left by incompleteness of previous ProxyPassReverse fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232247 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 09:38:09 +00:00
Mladen Turk
e7479bf114 Add status param option so that current worker
status can be changed via editing httpd.conf instead
just using web page. Seems the ApacheCon is paying of.
Thanks to Sander for pointing that out.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@225751 13f79535-47bb-0310-9956-ffa450edef68
2005-07-28 11:16:34 +00:00
Paul Querna
693107a967 - Use apr_uri_t to parse the proxy URL, instead of munging it by hand. Original code did not handle IPv6 Addresses correctly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178391 13f79535-47bb-0310-9956-ffa450edef68
2005-05-25 06:42:33 +00:00
Mladen Turk
86efa87d70 Revert the latest hack for setting query string.
The balancer needs canon_handler.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160674 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 10:08:56 +00:00
Mladen Turk
94f13c9748 Add r->args to uri->query if the original r->uri
did not contain query string. This fixes #34266.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160663 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 07:32:42 +00:00
Jeff Trawick
9ff46dd755 Remove formatting characters from ap_log_error() calls. These
were escaped as fallout from CAN-2003-0020.

Submitted by: Eric Covener <ecovener gmail.com>
Reviewed by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153105 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 19:01:43 +00:00
Sander Striker
7b9a0e8388 * modules/proxy/proxy_util.c
(ap_proxy_pre_request): Log an error when all workers are busy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152964 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 23:57:50 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Jim Jagielski
9935c31bdd Close PR 32459, 15207. API change for PROXY_DECLARE ap_proxy_canonenc()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151153 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 13:38:24 +00:00
Jim Jagielski
fe2650384d Add in a weighted byte count of all traffic (in and out) as
an alternative balancing method. We do not "adjust" the
byte count wrt scheme or method, simply by factoring
in the lbfactor value.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@126304 13f79535-47bb-0310-9956-ffa450edef68
2005-01-24 18:28:16 +00:00
Sander Striker
46ba14216d Rewrite Cookies and other headers in mod_proxy_ajp as configured with
ProxyPassReverse and ProxyPassReverseCookiePath.

* modules/proxy/proxy_ajp.c

  (ap_proxy_ajp_request): Update call to ajp_parse_header().


* modules/proxy/ajp.h

  (ajp_msg_get_string): constify argument.

  (ajp_parse_header): Add conf argument.


* modules/proxy/proxy_util.c

  (ap_proxy_location_reverse_map): Promoted from mod_proxy_http.

  (ap_proxy_cookie_reverse_map): Promoted from mod_proxy_http;
    renamed from proxy_cookie_reverse_map.


* modules/proxy/ajp_msg.c

  (ajp_msg_get_string): constify argument.


* modules/proxy/proxy_http.c

  (ap_proxy_location_reverse_map, proxy_cookie_reverse_map: Removed.

  (process_proxy_header): Update header mapping table to reference the now
    public functions.


* modules/proxy/ajp_header.c

  (ajp_unmarshal_response): And conf argument.  Reverse map cookies and
    other headers.

  (ajp_parse_header): Update call to ajp_unmarshal_response().


* modules/proxy/mod_proxy.h

  (ap_proxy_location_reverse_map, ap_proxy_cookie_reverse_map): Declare
    functions that have been promoted to be public.

  (ap_proxy_header_reverse_map_fn): Typedef for the signature of the above
    two functions (currently used in mod_proxy_http).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124901 13f79535-47bb-0310-9956-ffa450edef68
2005-01-11 08:35:46 +00:00