Commit Graph

1100 Commits

Author SHA1 Message Date
1704a79477 * Check more strictly that the backend follows the AJP protocol.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@764239 13f79535-47bb-0310-9956-ffa450edef68
2009-04-11 19:49:12 +00:00
b6b2ba9ef2 * Avoid delivering content from a previous request which failed to send a request
body by closing the connection to the backend in this case instead of reusing it.

CVE: CVE-2008-5519
PR: 46949
Reviewed by: jim, wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@763394 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 21:06:46 +00:00
8a65f5dff0 The remote port information was forgotten from the builtin
data of the AJP 13 protocol.  Since the servlet spec allows
to retrieve it via getRemotePort(), we provide the port to
the Tomcat connector as an additional request attribute.
Modern/future Tomcat versions know how to retrieve
the remote port from the attribute AJP_REMOTE_PORT.

See:
https://issues.apache.org/bugzilla/show_bug.cgi?id=41263
http://svn.eu.apache.org/viewvc?view=rev&revision=756926
http://svn.eu.apache.org/viewvc?view=rev&revision=757223


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@761329 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 15:49:29 +00:00
b6652d949e handle an unfortunate implication of loadable MPMs:
calls to ap_mpm_query() must be deferred until after the register-hooks hook, since that's 
where the MPM registers its mpm-query hook


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@761226 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 10:05:39 +00:00
82b000731f ap_strchr_p() is the one that takes (protects) a const char *
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@761085 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 22:10:30 +00:00
0acd50d150 clean up apr_time_from_msec() compatibility macros
* where needed, base on APR_VERSION_AT_LEAST() so we remember what this is about
* where not, axe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@761084 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 22:06:49 +00:00
e468a9fae6 * Add SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN directives to enable
stricter checking of remote server certificates.

  (docs/manual/mod/mod_ssl.xml)
    Documentation of SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.

  (modules/proxy/mod_proxy_http.c)
    Set the hostname of the request URL as note on the connection.

  (modules/ssl/ssl_private.h)
    Add proxy_ssl_check_peer_expire and proxy_ssl_check_peer_cn fields to
    the SSLSrvConfigRec.

  (modules/ssl/ssl_engine_config.c)
    Directives stuff for SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.

  (modules/ssl/ssl_engine_io.c)
    Check whether the remote servers certificate is expired / if there is a
    mismatch between the requested hostanme and the remote server certificates
    CN field.
    Be able to parse ASN1 times.

  (modules/ssl/mod_ssl.c)
    Directives stuff for SSLProxyCheckPeerExpire and SSLProxyCheckPeerCN.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760866 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 12:07:47 +00:00
9d85632112 * modules/proxy/mod_serf.c
(hb_server_sort): Use correct variables for sorting.

Noticed by: Rüdiger


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759673 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 12:42:15 +00:00
25c888fa96 Add static cluster backend, for very simple configurations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759476 13f79535-47bb-0310-9956-ffa450edef68
2009-03-28 15:03:01 +00:00
ab7e6aa87d Add very basic, non-streaming, support for request bodies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759469 13f79535-47bb-0310-9956-ffa450edef68
2009-03-28 14:31:19 +00:00
51fa0a1acd - Improve flushing/connection eos logic.
- Use brigade_write instead of immortal buckets that aren't immortal.
- Read HTTP status code from serf.
- Remove extra logging.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759462 13f79535-47bb-0310-9956-ffa450edef68
2009-03-28 13:51:51 +00:00
a51ec65a24 Work in Progress.
Convert the 100ms timed callback to a single cleanup callback that is added
when the request is ready to finish. Basically works, though it has
some issues with flushing and closing the connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759460 13f79535-47bb-0310-9956-ffa450edef68
2009-03-28 13:24:18 +00:00
c9c5ae3ce6 If the MPM supports serf in its core, use this to drive the proxied request
completely async from the original thread.

Right now it uses a 100ms timer to determine when the request is actaully complete,
but I think this can be removed in the long run with a better mechanism.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759414 13f79535-47bb-0310-9956-ffa450edef68
2009-03-28 01:02:32 +00:00
b145fc9e77 Add support for Preserving the client provided Host header.
* modules/proxy/mod_serf.c
    (serf_config_t): Add preservehost member.
    (setup_request): If preservehost is set, use the client provided Host header,
        otherwise use the one from the configuration.
    (is_true): New helper function for decoding true/false strings.
    (add_pass): Change to an argv configuration function, check for not enough
        args, and parse everything after the URI into key/value pairs.
    (create_dir_config): Default to setting preservehost to on.
    (serf_cmds): Change add_pass to a take argv directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759395 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 23:56:53 +00:00
a9d397bef0 * modules/proxy/mod_serf.c
(hb_list_servers): Allows relative paths for the heartbeat file.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759389 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 23:17:06 +00:00
3d379b20f5 Work in Progress.
Add Clustered proxying support to mod_serf, by using the heartbeats system.

No preconfiguration of cluster members is needed.

Just a config like this:
    SerfCluster sweet heartbeat file=/var/cache/apache/hb.dat
    SerfCluster sour heartbeat file=/var/cache/apache/cluster2.dat
    <Location "/">
      SerfPass cluster://sweet
    </Location>
    <Location "/different_cluster">
      SerfPass cluster://sour
    </Location>

The location of all possible destination servers is provided by a new 
providers interface, that includes configuration checking of the arguments to 
the SerfCluster command, solving one of the worst problems with the mod_proxy 
load balancer subsystem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759386 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 23:10:21 +00:00
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
2f9b9fdd70 remove BeOS OS support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758891 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 22:23:44 +00:00
6906b42373 Add mod_proxy_ftp directives ProxyFtpListOnWildcard and ProxyFtpEscapeWildcards
to allow filenames with globbing characters to be retrieved instead of
presented in a directory listing.

Submitted by: Dan Poirier <poirier pobox.com>
Reviewed by: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758626 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 13:25:25 +00:00
77db8b2111 Note for self: PPR drops the path info so we
don't really honor PPR /foo balancer://bar/jimbob
in a way that we would expect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@752140 13f79535-47bb-0310-9956-ffa450edef68
2009-03-10 15:33:05 +00:00
197c5ef541 Correct logic with non-seq lbsets config'ed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739854 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 21:53:05 +00:00
0af11397c1 Correct logic with non-seq lbsets config'ed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739853 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 21:52:54 +00:00
90c8377961 Correct logic with non-seq lbsets config'ed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739852 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 21:52:38 +00:00
421ee8b008 Disabled DefaultType directive and removed ap_default_type()
from core.  We now exclude Content-Type from responses for which
a media type has not been configured via mime.types, AddType,
ForceType, or some other mechanism.  MMN major bump to NZ time.

PR: 13986



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739382 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 19:12:51 +00:00
7621dff997 * Correctly construct base href url in the reverse proxy case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@738268 13f79535-47bb-0310-9956-ffa450edef68
2009-01-27 22:08:23 +00:00
a3c2a975c9 * Try first if we find any "recoverable" workers before we force them to
recover.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@734710 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15 13:59:11 +00:00
01d3b428ea * Set the error time if we set a worker in error mode.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@734703 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15 13:44:23 +00:00
5c8ab974a1 use ap_log_rerror instead of r->server per niq's comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733219 13f79535-47bb-0310-9956-ffa450edef68
2009-01-10 01:35:50 +00:00
f63b5a4dbd pass a server_rec to ap_log_error on two interim response messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733127 13f79535-47bb-0310-9956-ffa450edef68
2009-01-09 19:31:48 +00:00
a4b24e0aed Remove tabs. no functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@732772 13f79535-47bb-0310-9956-ffa450edef68
2009-01-08 17:49:45 +00:00
65fa321a6c * modules/proxy/config.m4: Remove spurious notices from configure.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730928 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03 06:48:40 +00:00
8eb168a906 Use LDADD mechanism to only link mod_serf resp.
mod_lua to libserf resp. liblua.

No need to include this dependency in all other
modules and binaries.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730876 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03 00:20:14 +00:00
4f75107ee0 Use default object file in APACHE_MODULE calls
when possible.

It seems that's the way it is used for most modules,
so remove unnecessary explicit object file lists.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730829 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 19:43:09 +00:00
13618e8c65 Add a declaration check for CMSG_DATA to mod_proxy_fdpass.
Also move '#error' after the includes, because it seems
CMSG_DATA is commonly defined in sys/socket.h.

The check also overwrites _apmod_error_fatal in case
CMSG_DATA is not defined to allow building when configure
was called with "--enable-proxy". Otherwise one would need
to explicitly disable mod_proxy_fdpass.

We might want to remove the #error completely, because the
new feature test prevents the building of the module when
the symbol is not defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730803 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 18:15:02 +00:00
6da5f085da add mod_proxy_scgi, as announced a long time ago
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729538 13f79535-47bb-0310-9956-ffa450edef68
2008-12-26 21:41:48 +00:00
5eb866768d Fix C90 forbids mixed declarations and code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@728547 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 22:58:56 +00:00
f2cf8d6e5d Use apr_cpystrn instead of strncpy since strncpy can create an unterminated string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@727777 13f79535-47bb-0310-9956-ffa450edef68
2008-12-18 17:51:18 +00:00
500d4a7c83 Remove safe duplication...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726217 13f79535-47bb-0310-9956-ffa450edef68
2008-12-13 15:12:06 +00:00
8f1ff371d7 Treat proxy/balancers normally and independently...
also, allow nice pretty

   Making all in proxy
     ...
   Making all in proxy/balancers



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726068 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 16:31:15 +00:00
1e06b62d69 Add configuration of the Flush provider for mod_proxy_fdpass.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725946 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 08:46:47 +00:00
3161002dc7 Move the provider interface to a separate header file for mod_proxy_fdpass.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725943 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 08:33:31 +00:00
ad762da5ad Convert the flushing mechanism used before passing the socket to be based on a provider, and include a default one using a flush.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725942 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 08:24:28 +00:00
38ca097dde Add a new mod_proxy_fdpass module to pass a client connection off to a separate daemon.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725940 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 08:04:47 +00:00
0b645bf324 OK, instead of an igly hack, just use the normal
build system impl to force balancer's config to
happen post proxy 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724367 13f79535-47bb-0310-9956-ffa450edef68
2008-12-08 14:51:50 +00:00
c27585f6e4 Explain some things
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724360 13f79535-47bb-0310-9956-ffa450edef68
2008-12-08 14:31:30 +00:00
826cb7f002 Force the lbmethod submodules to be loaded AFTER
mod_proxy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724358 13f79535-47bb-0310-9956-ffa450edef68
2008-12-08 14:28:28 +00:00
54d13fef11 Make the max time from when we last saw a host a compile time option.
Suggested by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723685 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 09:29:52 +00:00
f47b6f394e Import the core parts of the DTrace patch. This is a modified and updated
version of what was submited by Theo before:
 <http://mail-archives.apache.org/mod_mbox/httpd-dev/200805.mbox/%3C6AFBCFE8-4CCA-4A02-8A43-F9170689695D@omniti.com%3E>

Note, this does not hook it up into the build system at this time, because
the original patch was a little too creative there.

Submitted By: Theo Schlossnagle <jesus omniti.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723565 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 03:34:52 +00:00
653ac709cc All lbmethods are now ind submodules...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722952 13f79535-47bb-0310-9956-ffa450edef68
2008-12-03 16:08:26 +00:00