1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-18 11:41:02 +03:00
Commit Graph

774 Commits

Author SHA1 Message Date
Ruediger Pluem
80aafcc1fc * Do not close the backend connection, because the client sent a
Connection: close header.

PR: 38524


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377057 13f79535-47bb-0310-9956-ffa450edef68
2006-02-11 21:15:12 +00:00
Ruediger Pluem
859a572ba2 * Do not remove the connection headers from r->headers_in. They are needed
by the http output filter to create the correct connection response headers.
  Instead work on a copy of r->headers_in.

PR: 38524


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377053 13f79535-47bb-0310-9956-ffa450edef68
2006-02-11 20:57:12 +00:00
Joe Orton
b2e9ae5b1d * modules/proxy/mod_proxy_balancer.c: Include unistd.h to pick up
getpid() prototype.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@375310 13f79535-47bb-0310-9956-ffa450edef68
2006-02-06 16:35:20 +00:00
Ruediger Pluem
f6b46944d4 * Do not overwrite the status of initialized workers and respect the configured
status of uninitilized workers when creating a new child process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@374929 13f79535-47bb-0310-9956-ffa450edef68
2006-02-04 21:25:48 +00:00
Ruediger Pluem
d66bb0a4d0 * Fix PR38340 by actual getting the word and thus advancing the message buffer
pointer to the next data.

Submitted by: Aleksey Pesternikov <apesternikov yahoo.com>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@371013 13f79535-47bb-0310-9956-ffa450edef68
2006-01-21 11:30:41 +00:00
Jim Jagielski
32df739a8f Explain how we're checking to see if ap_proxy_backend_broke()
has been called or not. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366558 13f79535-47bb-0310-9956-ffa450edef68
2006-01-06 20:04:43 +00:00
Ruediger Pluem
6b17fc2596 * Call ap_proxy_http_cleanup after ap_log_rerror because it resets
backend->hostname to NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366279 13f79535-47bb-0310-9956-ffa450edef68
2006-01-05 21:02:36 +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
Mladen Turk
49ce35caa5 Fix Cookie2 header problems that originates back
from mod_jk. Cookie2 was always sent as Cookie.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@358769 13f79535-47bb-0310-9956-ffa450edef68
2005-12-23 08:36:18 +00:00
Jim Jagielski
d4f879aefa Morph the ap_http_broken_backend_filter() proxy "specific"
filter to a generic http error handling output filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@358022 13f79535-47bb-0310-9956-ffa450edef68
2005-12-20 15:50:37 +00:00
Martin Kraemer
e4c6f88a87 In Apache-2.x, the function is called apr_pstrdup().
The 'tmp' variable is not really necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357699 13f79535-47bb-0310-9956-ffa450edef68
2005-12-19 14:50:56 +00:00
Ruediger Pluem
dcc563844c * If the mod_proxy backend connection broke in the middle of the response,
then
  - Do not cache it.
  - Signal the client that something went wrong by closing the connection
    and not sending the last-chunk marker if the response was T-E chunked.

server/core_filters.c         : Close the connection to the client by setting
                                c->keepalive to AP_CONN_CLOSE.
modules/http/chunk_filter.c   : Do not send last-chunk marker in the case
                                the backend broke.
modules/proxy/mod_proxy_http.c: Signal that the backend connection broke.
modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response


Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357461 13f79535-47bb-0310-9956-ffa450edef68
2005-12-18 12:07:39 +00:00
Jean-Frederic Clere
fe2d495671 Sorry, previous commit was not ok.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357044 13f79535-47bb-0310-9956-ffa450edef68
2005-12-15 16:58:10 +00:00
Jean-Frederic Clere
5aa5b6bf3e The string comming from TC is in ASCII and the string returned by apr_psprintf isn't.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357022 13f79535-47bb-0310-9956-ffa450edef68
2005-12-15 14:44:39 +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
Ruediger Pluem
06c6bde4c6 * revert r355823 and r355837
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355853 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 01:28:13 +00:00
Ruediger Pluem
c666adbbae * Let the proxy handler know that the backend connection broke after we have
sent the headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355837 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 00:50:21 +00:00
Ruediger Pluem
614df45f1e * Move handling of backends that broke after the headers have been sent
into the proxy handler of mod_proxy.

  This patch still sets r->connection->aborted to 1 which is currently
  vetoed by Roy. Moving it from the scheme handler to the proxy handler
  should ease the reimplementation of this, as the scheme handlers only
  needs to return PROXY_BACKEND_BROKEN to signal the above situation to
  the proxy handler.

  mod_proxy.h: Add define for PROXY_BACKEND_BROKEN
  mod_proxy.c: Handle PROXY_BACKEND_BROKEN in proxy handler
  mod_proxy_http.c: Sent back PROXY_BACKEND_BROKEN if backend broke
  after we sent the headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355823 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 00:15:27 +00:00
Justin Erenkrantz
70a553c87c Add a comment and use proper grammar for another comment.
(No functional changes.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354636 13f79535-47bb-0310-9956-ffa450edef68
2005-12-07 00:44:13 +00:00
Justin Erenkrantz
5311a38fcf If we get an error reading the upstream response, we should bail.
Reported by: Brian Akins


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354628 13f79535-47bb-0310-9956-ffa450edef68
2005-12-07 00:18:58 +00:00
Ruediger Pluem
e708604555 * Fix PR37753. Off by one bug in get_path_param eats up too much of the string
such that session identifier for sticky sessions is never found in URL.

Submitted by: Kazuhiro Osawa <ko yappo.ne.jp>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@352010 13f79535-47bb-0310-9956-ffa450edef68
2005-12-03 20:17:11 +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
Jeff Trawick
3a67f28030 Fix typo in ProxyStatus syntax error message.
Submitted by: Christophe Jaillet <christophe.jaillet wanadoo.fr>
Reviewed by:  trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@344491 13f79535-47bb-0310-9956-ffa450edef68
2005-11-16 01:31:44 +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
Ruediger Pluem
9d3ff0e04b * Fix PR37145 (data loss with httpd-2.0.55 reverse proxy method=post) by
exchanging APR_BRIGADE_CONCAT with ap_save_brigade to ensure that
  transient buckets get setaside correctly between various iterations of
  ap_get_brigade calls.

Reviewed by: Joe Orton, William Rowe, Jim Jagielski, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327590 13f79535-47bb-0310-9956-ffa450edef68
2005-10-21 21:50:46 +00:00
Ruediger Pluem
a9d2ab75d0 * Fix PR37100 (SEGV in mod_proxy_ajp), by sending the data up the filter
chain immediately instead of spooling it completely before passing it
  to the filter chain. It contains a bandaid to handle intentional
  flushes from Tomcat side. Further explanation in code and report.

  ajp.h:           Add ajp_msg_reuse prototype

  mod_proxy_ajp.c: Adjust logic of ap_proxy_ajp_request

  ajp_msg.c:       Add ajp_msg_reuse

  ajp_header.c:    Adjusting logic of ajp_read_header


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327185 13f79535-47bb-0310-9956-ffa450edef68
2005-10-21 13:54:38 +00:00
Ruediger Pluem
77df2cdf5f * Style fixes: Add line breaks for lines that are too long. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@325879 13f79535-47bb-0310-9956-ffa450edef68
2005-10-17 11:20:17 +00:00
Ruediger Pluem
18d60fb710 * Style fixes: Spaces, comments, typos. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@322467 13f79535-47bb-0310-9956-ffa450edef68
2005-10-16 11:09:09 +00:00
Ruediger Pluem
6163d20351 * Cleanup: Remove dead code. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@322464 13f79535-47bb-0310-9956-ffa450edef68
2005-10-16 10:31:45 +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
13bceeee23 * Fix a declaration problem introduced in r195013 that is C99 but not ANSI C
compatible. Thus move declaration of *worker to the top of find_session_route
  to make it ANSI C compatible again.

Submitted by: NormW <normw bocnet.com.au>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307389 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 10:59:06 +00:00
Ruediger Pluem
7a221adca5 * Fix PR36883 (mod_proxy_ajp and tomcat issues).
Submitted by: William Barker <william.barker wilshire.com>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307195 13f79535-47bb-0310-9956-ffa450edef68
2005-10-07 21:05:01 +00:00
Jeff Trawick
8aa8c98bd0 mod_proxy_connect: Fix high CPU loop on systems like UnixWare which
trigger POLL_ERR or POLL_HUP on a terminated connection.

PR: 36951


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@306878 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 20:31:03 +00:00
Ruediger Pluem
fc078f7336 * Fix PR36507 (mod_proxy_balancer does not handle sticky sessions with
tomcat correctly).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295013 13f79535-47bb-0310-9956-ffa450edef68
2005-10-05 07:59:36 +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
Ruediger Pluem
16051d9681 * run the request_status hook in proxy_handler if HTTP_SERVICE_UNAVAILABLE
is returned by ap_proxy_pre_request.

Suggested by: Brian Akins <brian.akins turner.com>, Mladen Turk
Reviewed by: Jim Jagielski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293123 13f79535-47bb-0310-9956-ffa450edef68
2005-10-02 14:32:35 +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
d2f9ab1659 gcc -Wall fix: depending on signedness of char.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@280013 13f79535-47bb-0310-9956-ffa450edef68
2005-09-10 14:59:48 +00:00
Joe Orton
8df46b6dd6 * modules/proxy/mod_proxy_balancer.c (balancer_handler): Fix gcc
warning; no functional change.

* modules/proxy/mod_proxy.c (set_balancer_param): Likewise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279973 13f79535-47bb-0310-9956-ffa450edef68
2005-09-10 09:10: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
Bradley Nicholes
41bab0086f Remove proxy_hook_load_lbmethods from Netware export list
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279579 13f79535-47bb-0310-9956-ffa450edef68
2005-09-08 16:37:00 +00:00
Jim Jagielski
54bb998b3a Minor nit. Methods are server-wide, so simply use the base version table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279319 13f79535-47bb-0310-9956-ffa450edef68
2005-09-07 13:14:16 +00:00