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

304 Commits

Author SHA1 Message Date
Graham Leggett
cb21a0dbcc Further clarify the naming of the entity that directly connects to us by
calling that entity a client instead of a peer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
Graham Leggett
2af2fa44ad Further clarify the naming of the entity that originates the request by
calling that entity a useragent instead of a client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +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
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
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
394e5594d6 Introduce a per connection "peer_ip" and a per request "client_ip" to
distinguish between the raw IP address of the connection and the effective
IP address of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Graham Leggett
4ee7eea4cf Introduce a per request version of the remote IP address, which can be
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
Stefan Fritsch
8ec7f5c5bf great proxy logging cleanup:
* remove "proxy:", "FCGI", etc. prefixes and pid which are now
    included in the error log format

  * propagate frontend request's logconfig to backend request
    
  * use ap_log_rerror where possible
    
  * remove obsolete APLOG_NOERRNO


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203859 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:41:09 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
24e349de03 mod_proxy_http, mod_proxy_connect: Add 'proxy-status' and 'proxy-source-port'
request notes for logging

PR: 30195


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154342 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 18:35:29 +00:00
Stefan Fritsch
61a0413706 Use APR_STATUS_IS_... in some more cases.
While this is not strictly necessary everywhere, it makes it much easier
to find the problematic cases.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1102124 13f79535-47bb-0310-9956-ffa450edef68
2011-05-11 22:51:46 +00:00
Ruediger Pluem
91960c0b37 * Play safe if the notes table does not contain an SSL_connect_rv key.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1069785 13f79535-47bb-0310-9956-ffa450edef68
2011-02-11 12:50:31 +00:00
Igor Galić
ceb1766d2d Add a patch from Vincent Deffontaines to make the adding of X-forwarded-*
headers configurable: ProxyAddHeaders, defaulting to 'On'.
http://www.mail-archive.com/dev@httpd.apache.org/msg49971.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060795 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 12:48:17 +00:00
Jim Jagielski
201bbd1ba9 More movement to shared stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00
Jeff Trawick
62740bfdee fix comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055605 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 19:47:45 +00:00
Jim Jagielski
b65d51455a update comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055570 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 18:33:45 +00:00
Graham Leggett
9e215e4840 Make sure we clone the table rather than copy it, to ensure that no keys
or values allocated from r->pool end up referenced in the backend request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055386 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 09:53:55 +00:00
Graham Leggett
e0cf3c996e mod_proxy_http: Allocate the fake backend request from a child pool
of the backend connection, instead of misusing the pool of the frontend
request. Fixes a thread safety issue where buckets set aside in the
backend connection leak into other threads, and then disappear when
the frontend request is cleaned up, in turn causing corrupted buckets
to make other threads spin.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055250 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 00:23:43 +00:00
Graham Leggett
b7e70e242d mod_proxy_http: Ensure that when the backend is closed, the final call to
ap_proxy_http_cleanup() is suppressed, so that the backend is not cleaned
twice. Fixes a further thread safety issue.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055246 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 23:55:50 +00:00
Graham Leggett
4275788f59 Change another variable that could be confused for conn_rec.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053967 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 18:32:15 +00:00
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
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
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
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
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
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
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
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
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
Rainer Jung
dd92e8d0d3 Use APR_STATUS_IS_TIMEUP instead of direct compare to APR_TIMEUP to
be more safe on different platforms.

Note: This commit has an additional, platform-independent change to
mark the back-end connection for closing ("backend->close = 1;").
That code is not required to resolve CVE-2010-2068 on any platform.

PR: 49417
Addresses CVE-2010-2068


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@953418 13f79535-47bb-0310-9956-ffa450edef68
2010-06-10 18:52:27 +00:00
Stefan Fritsch
01b9f2e551 - Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
- Add some trace logging to core and http


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951900 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:07:12 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Stefan Fritsch
24f392484d log remote server port in various places
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@921347 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 13:37:00 +00:00
Nick Kew
f28e2bdea4 mod_proxy_http: get the headers right in a HEAD request with ProxyErrorOverride.PR 41646
Analysis by Stuart Children; patch by niq


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@912063 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 01:54:15 +00:00
Graham Leggett
2ba04c9547 mod_proxy_http: Make sure that when an ErrorDocument is served
from a reverse proxied URL, that the subrequest respects the status
of the original request. This brings the behaviour of proxy_handler
in line with default_handler. PR 47106.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@909899 13f79535-47bb-0310-9956-ffa450edef68
2010-02-13 20:24:24 +00:00
Jeff Trawick
d854b9d90c fix or complain about some invalid errno references
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882269 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 20:00:12 +00:00
Stefan Fritsch
3fa2c0e208 Allow ProxyPreserveHost to work in <Proxy> sections
PR: 34901


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@824072 13f79535-47bb-0310-9956-ffa450edef68
2009-10-11 13:38:51 +00:00
Nick Kew
93cdac913c Return consistent error status for proxy unable to connect
PR 46971


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@806920 13f79535-47bb-0310-9956-ffa450edef68
2009-08-23 02:00:43 +00:00