1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

1417 Commits

Author SHA1 Message Date
Ruediger Pluem
2eb8e09fe7 * Fix r1039304 and make the patch similar to the one proposed for
2.2.x: If the SSL handshake to the backend fails we cannot even
  sent an HTTP request. So the check needs to happen already when
  we sent data not when we receive data.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053584 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 09:43:56 +00:00
Ruediger Pluem
cbe247d915 * The concept of the cleaned flag is flawed: Once we returned the connection
to the pool we cannot longer rely on it as another thread could have leased
  the connection in the meantime and might have modified it.
  BUT: We only use this flag once we returned the connection to the pool.
  So signal that we returned the connection to the pool by something that is
  local to the thread, in this case set backend to NULL if we already have
  returende the connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052314 13f79535-47bb-0310-9956-ffa450edef68
2010-12-23 16:43:43 +00:00
Ruediger Pluem
23bc3de91b * Do not fiddle around with the close field if we might have returned the
connection to the pool already. It might be already in use again by another
  thread.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052224 13f79535-47bb-0310-9956-ffa450edef68
2010-12-23 11:10:56 +00:00
Graham Leggett
d37c924b9d The alias_set variable is set when a parent location contains a ProxyPass,
so this check catches valid ProxyPasses. Remove the check.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1051628 13f79535-47bb-0310-9956-ffa450edef68
2010-12-21 20:00:38 +00:00
William A. Rowe Jr
956c10f79c Text, please
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1051318 13f79535-47bb-0310-9956-ffa450edef68
2010-12-20 23:36:12 +00:00
Ruediger Pluem
5daa6b7a7d * Put a note in the connection notes that the SSL handshake to the backend
failed such that mod_proxy can put the worker in error state.

PR: 50332
Submitted by: Daniel Ruggeri <DRuggeri primary.net>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039304 13f79535-47bb-0310-9956-ffa450edef68
2010-11-26 10:33:19 +00:00
Stefan Fritsch
91cfd21ba9 Fix 'comparison is always false due to limited range of data type'.
One-bit flags should really be unsigned


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036605 13f79535-47bb-0310-9956-ffa450edef68
2010-11-18 20:20:12 +00:00
Stefan Fritsch
39db8e5413 mod_proxy: Fix ProxyPassInterpolateEnv directive.
PR: 50292


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036602 13f79535-47bb-0310-9956-ffa450edef68
2010-11-18 20:15:24 +00:00
Graham Leggett
662633eacc When the proxy closes the backend connection early, force a setaside on
any buckets still outstanding to ensure they've been copied out of the
backend connection's pool and it is safe to release the backend connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035605 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 12:08:38 +00:00
Graham Leggett
807be6db70 Revert r1035504, this was the wrong way to do it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035576 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 10:27:26 +00:00
Graham Leggett
38437740bb Fix pool lifetime issues when the proxy backend connection is terminated
early by forcing a setaside on transient buckets placed in the brigade
by mod_ssl. This has the effect of extending the lifetime of buckets until
the end of the request. This is a variation on the original fix for this
problem, which added transient buckets to be setaside later in the process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035504 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 00:23:37 +00:00
Nick Kew
3bad5b1780 Fix mod_proxy to support setting source address.
PR 29404
Seems lots of users want this, and a couple of them have recenly asked nicely


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1034916 13f79535-47bb-0310-9956-ffa450edef68
2010-11-14 00:01:43 +00:00
Jeff Trawick
a1a3d3820c mark connection for close after the return from
ap_proxy_determine_connection()

before this revision: if there was an existing connection,
ap_proxy_determine_connection() would close it but then clear
the close flag, so it didn't get closed by
ap_proxy_release_connection()

thus, if this child process doesn't use the connection for a
while, the application could be stuck in read() for the same
while

after: ap_proxy_release_connection() will close it after the
request completes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032345 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 18:54:44 +00:00
Jeff Trawick
f0fb1e6653 log how long worker will be disabled
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032290 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 14:49:58 +00:00
Jeff Trawick
c0d5e1671d improve wording of some function descriptions
add explicit "FIXME" to an ancient issue

remove implicit fixme wording related to mutex use


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032286 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 14:35:21 +00:00
Jeff Trawick
c7d76f1aac axe outdated comment about FIXMEs/CHECKMEs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032271 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 13:13:26 +00:00
Jeff Trawick
2c8ec34cd0 avoid duplicate end-of-stdin header
avoid passing {iov_base = &buffer, iov_len=0} to writev() when
there is no stdin data


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032266 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 12:35:32 +00:00
Jim Jagielski
a280069b3c a pointer optim.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031798 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 21:17:05 +00:00
Eric Covener
b73db43c7a PR47765: ProxyPass and ProxyPassReverse should not be accepted in
Directory or Files sections.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031758 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 20:03:02 +00:00
Jeff Trawick
91ab95835f repeat apr_poll() while EINTR
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031613 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 15:04:37 +00:00
Eric Covener
b76f1b5dbf PR50220: keep on chugging after EINTR in mod_proxy_connect
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031551 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 13:12:14 +00:00
Graham Leggett
c81adad105 Fix a pool lifetime issue: Make sure we clean up our brigade before we
hand the backend connection back to the connection pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1030855 13f79535-47bb-0310-9956-ffa450edef68
2010-11-04 08:37:13 +00:00
Rainer Jung
2d9338d1dd Followup to r1026665: reset "cleaned" flag in
ap_proxy_acquire_connection().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1030850 13f79535-47bb-0310-9956-ffa450edef68
2010-11-04 08:09:57 +00:00
Daniel Earl Poirier
4c477008d4 Add to modules' help text (displayed by ./configure -h) more
information that will be useful in deciding whether to enable
them or not.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1029814 13f79535-47bb-0310-9956-ffa450edef68
2010-11-01 20:02:51 +00:00
Daniel Earl Poirier
6b803976f2 Fix a number of typos and misspellings. Reported by Ville Skytta.
PR48496.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1029134 13f79535-47bb-0310-9956-ffa450edef68
2010-10-30 17:56:13 +00:00
Graham Leggett
87c10fe5f1 Optimise more of the flags within proxy structures.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026668 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:34:16 +00:00
Graham Leggett
9d58cd6990 mod_proxy: Release the backend connection as soon as EOS is detected,
so the backend isn't forced to wait for the client to eventually
acknowledge the data.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026665 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:26:44 +00:00
Stefan Fritsch
73ea59a31a Remove needless pool cleanup. ap_pregcomp already registers a cleanup for the
regex.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026636 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 16:20:10 +00:00
Graham Leggett
8e5be99791 Fix an inline variable declaration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026187 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 00:46:39 +00:00
Graham Leggett
13fec746f9 mod_proxy: Optimise ProxyPass within a Location so that it is stored
per-directory, and chosen during the location walk. Make ProxyPass
work correctly from within a LocationMatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026184 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 00:13:45 +00:00
Graham Leggett
a68e17cdb2 Optimise the set flags in the mod_proxy structures.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025699 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 19:47:00 +00:00
Graham Leggett
84a346c5bb mod_proxy: Move the ProxyErrorOverride directive to have per directory scope.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025666 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 18:33:55 +00:00
Graham Leggett
1ba4520701 Avoid unnecessariy initialisation before we test handler name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024449 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 22:48:38 +00:00
Jeff Trawick
f3a3ac86c6 axe an unnecessary call to sscanf() when parsing the response line
from the origin server

apr_date_checkmask() already verified the expected text and digit
positions; all that is needed is to cheaply find which digits


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999694 13f79535-47bb-0310-9956-ffa450edef68
2010-09-22 00:07:52 +00:00
Ruediger Pluem
85c753fe0d * LimitRequestBody does not affect Proxy requests (Should it?).
Let it take effect if we decide to store the body in a
  temporary file on disk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999288 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 09:23:39 +00:00
Jim Jagielski
1d50e028df Fold in possible use of FNV if desired
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998949 13f79535-47bb-0310-9956-ffa450edef68
2010-09-20 14:51:19 +00:00
Jeff Trawick
eed7564b03 ap_proxy_retry_worker() only needs to spit out one debug
message, and it should indicate whether or not retry will
be attempted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988635 13f79535-47bb-0310-9956-ffa450edef68
2010-08-24 18:04:06 +00:00
Jean-Frederic Clere
e8cf7c21e5 Prevent race condition
See http://www.mail-archive.com/dev@httpd.apache.org/msg47171.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988038 13f79535-47bb-0310-9956-ffa450edef68
2010-08-23 09:09:25 +00:00
Rainer Jung
8a73bd8002 Change behaviour of worker sharing.
A proxy worker is shared, if its URL is a leading substring
of the URL of another worker defined later in the configuration.

Before this change this
- triggered the "worker ... already used by another worker" message
- resulted in a hard to understand configuration for this worker
  - Attributes explicitely given in the later worker overwrote
    attributes in the worker which was defined first
  - General proxy attributes (e.g. ProxyTimeout ) overwrote
    attributes in the worker which was defined first

New behaviour:
- Talk about "sharing" of workers and log both worker URLs
  in the info log message instead of the "already used" message
- Do not overwrite attributes. If attributes were explicitely
  given in the later worker, log a warning that those are ignored
  because of sharing.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987854 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 09:47:29 +00:00
Rainer Jung
d59332de14 Minor style nits.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987853 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 09:46:23 +00:00
Jeff Trawick
5a222cf2cf mod_proxy: Rename erroronstatus to failonstatus...
... by popular demand, and add documentation.

Submitted by: Daniel Ruggeri <DRuggeri primary.net>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987359 13f79535-47bb-0310-9956-ffa450edef68
2010-08-20 00:54:34 +00:00
Jim Jagielski
b6c87a8750 Pull out "does request have a body" logic to a central
canon function and use that for the 100-Continue OK
check.

Should likely also start using this in the various
other places we do this "have body" check thruout
the codebase...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986699 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 14:30:50 +00:00
Jean-Frederic Clere
5bccbb504f Don't log errors when we can't send to client, just debug.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986591 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 08:31:36 +00:00
Jim Jagielski
864c25bbad Fix comment and code to be what it should have been/
thx to r and r for spotting this foobar.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986468 13f79535-47bb-0310-9956-ffa450edef68
2010-08-17 19:59:39 +00:00
Jim Jagielski
ef0da39058 Further checks for non-body requests...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986333 13f79535-47bb-0310-9956-ffa450edef68
2010-08-17 14:43:45 +00:00
Jim Jagielski
2a204ae83e detab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986318 13f79535-47bb-0310-9956-ffa450edef68
2010-08-17 14:15:07 +00:00
Jim Jagielski
87703dd78c For backends which are HTTP/1.1, do a quick test (ping)
of the "connection" via 100-Continue for reverse
proxies...

ACO and Filip Hanik also helped out with the idea...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986090 13f79535-47bb-0310-9956-ffa450edef68
2010-08-16 18:36:19 +00:00
Ruediger Pluem
633efb3314 * The forward and reverse worker do not keep connections alive, so
ensure that mod_proxy_http does the correct thing
  regarding the Connection header in the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@985112 13f79535-47bb-0310-9956-ffa450edef68
2010-08-13 07:24:36 +00:00
Jim Jagielski
c55a15fc2f Fold in some stuff to allow for matching of workers
to their actual scoreboard slots, independent of slot
ID.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@984188 13f79535-47bb-0310-9956-ffa450edef68
2010-08-10 19:46:58 +00:00
Jeff Trawick
0ce133f8a8 Intel's compiler warns about assigning the non-enum value 0 to the
enumeration apr_finfo_t.filetype, which is done when forgetting
the previously-derived file type

use the appropriate enum value APR_NOFILE instead

Also change comparisons of the field with 0 to use APR_NOFILE instead,
as is the practice of some existing code.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00