1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-04 21:42:15 +03:00

241 Commits

Author SHA1 Message Date
Jim Jagielski
d7e5be074a *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY
(disable Nagle algorithm) on sockets if implemented.
     PR 42871 [Christian BOITEL <christian_boitel yahoo.fr>, Jim Jagielski]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@562510 13f79535-47bb-0310-9956-ffa450edef68
2007-08-03 15:57:27 +00:00
Nick Kew
5e206de8a2 Improvement suggested by rpluem to proxy_date fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@562069 13f79535-47bb-0310-9956-ffa450edef68
2007-08-02 10:17:25 +00:00
Nick Kew
139f41aa75 Fix buffer overflow in date handling
PR 41144 (Davi Arnaut)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@561616 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 00:58:20 +00:00
Jean-Frederic Clere
55bb4fbe30 Fix the timeout logic. The order is now:
1 - worker->timeout
2 - proxy_conf->timeout
3 - server->timeout.
ap_get_module_config() is not perfect by that is easy to port back to 2.2.x.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@550514 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 14:29:54 +00:00
Jean-Frederic Clere
4751c3aa1f Arrange the proxy timeout behaviour.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@546128 13f79535-47bb-0310-9956-ffa450edef68
2007-06-11 12:40:37 +00:00
Jim Jagielski
1c8f89ea65 Abstract out (kinda) MSG_PEEK. This way when we
actually update APR and apr_socket_recvfrom()
to know about APR_MSG_OOB, APR_MSG_PEEK, etc...
this code won't need to be adjusted. Also,
make nicer for 2.2 backport.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@535354 13f79535-47bb-0310-9956-ffa450edef68
2007-05-04 19:12:38 +00:00
Jim Jagielski
e4c8e34188 Isolate the unlock return vals
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484978 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 13:47:56 +00:00
Jim Jagielski
3b5d5bf319 Failure to unlock is very nasty, so log it to help
with troubleshooting.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484792 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:37:08 +00:00
Ruediger Pluem
27f7eda663 * Ensure that at least scheme://hostname[:port] matches between worker and URL
when trying to find the worker that fits best to the given URL.

PR: 40910


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@481901 13f79535-47bb-0310-9956-ffa450edef68
2006-12-03 21:24:43 +00:00
Mladen Turk
3d180c45a6 Add alternate is_socket_connected by using APR functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@473278 13f79535-47bb-0310-9956-ffa450edef68
2006-11-10 09:15:21 +00:00
Mladen Turk
e22c26b53b Remove alternate is_socket_connected detection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@473276 13f79535-47bb-0310-9956-ffa450edef68
2006-11-10 09:12:57 +00:00
Ruediger Pluem
196a6e711e * Assign rv in the if statement to return the correct error code and
more important an error code at all, as currently APR_SUCCESS is returned
  in the error case.

PR: 40865
Submitted by: Andrew Rucker Jones <arjones simultan.dyndns.org>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@470076 13f79535-47bb-0310-9956-ffa450edef68
2006-11-01 20:20:42 +00:00
Mladen Turk
29bb9d02c7 Add missing include for experimental is_connected.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@452327 13f79535-47bb-0310-9956-ffa450edef68
2006-10-03 07:15:46 +00:00
Mladen Turk
93146d3b40 Cleanup alternate is_connected method.
It works for sure on win32,linux and solaris.
I do not have access to other platforms so can not
verify it works on them.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451896 13f79535-47bb-0310-9956-ffa450edef68
2006-10-02 07:06:24 +00:00
Mladen Turk
907c904bc6 Add alternative is_socket_connected implementation.
It works on win32 and linux for sure, so that's why
I put it inside the #ifdef.
Of course something like that needs APR abstraction.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451580 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 11:04:46 +00:00
Mladen Turk
6a68c112dc Enable retry=0 for the worker.
This allows to have an option to always retry
the workers in error state instead using a
specified time.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451575 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 10:41:51 +00:00
Ruediger Pluem
7361c75b95 * PROXY_WORKER_IS_INITIALIZED checks if PROXY_WORKER_INITIALIZED is set in
worker->s->status, but we need to check here if it is set in worker->status.

  As PROXY_WORKER_INITIALIZED is set in worker->s->status in
  ap_proxy_initialize_worker_share, which is called just before
  ap_proxy_initialize_worker we never initialize the worker. This is very bad
  as we create no reslist for the pool in this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@443503 13f79535-47bb-0310-9956-ffa450edef68
2006-09-14 22:34:34 +00:00
Nick Kew
3b19271873 PR#37770: Don't try to use dead backend connection in proxy
(Patch from Olivier BOEL)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431339 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 13:26:07 +00:00
Nick Kew
d160248d92 Fix tabs introduced in r429875
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429890 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:50:33 +00:00
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