Paul Querna [Sat, 28 Mar 2009 13:51:51 +0000 (13:51 +0000)]
- 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.
Paul Querna [Sat, 28 Mar 2009 13:24:18 +0000 (13:24 +0000)]
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.
Paul Querna [Sat, 28 Mar 2009 01:02:32 +0000 (01:02 +0000)]
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.
Paul Querna [Fri, 27 Mar 2009 23:56:53 +0000 (23:56 +0000)]
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.
Paul Querna [Fri, 27 Mar 2009 23:10:21 +0000 (23:10 +0000)]
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.
Paul Querna [Fri, 27 Mar 2009 13:27:44 +0000 (13:27 +0000)]
* modules/cluster/mod_heartmonitor.c
(hm_update_stats): Flush heartbeat file before closing, to make sure the file
is always written correctly, and check for errors on flush or close.
Jeff Trawick [Thu, 26 Mar 2009 15:43:46 +0000 (15:43 +0000)]
restore disable-nagle logic for connected sockets
Note: Prior to the MPM-as-DSO churn, the following MPMs did not enable this logic:
WinNT APR supports no-oping the setsockopt() based on inheriting Nagle from the
listening socket on this platform, so the new APR call will be a no-op.
simple same as WinNT for at least some Unix-y platforms
BeOS shrug
Eric Covener [Thu, 26 Mar 2009 13:25:25 +0000 (13:25 +0000)]
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
Jeff Trawick [Wed, 25 Mar 2009 14:50:24 +0000 (14:50 +0000)]
The rewrite-args hook isn't available to MPM DSOs. Piggy-back on the
linked-in mod_unixd.c to handle that.
(The set of MPMs modified is the same set for which mod_unixd is enabled,
which is approximately equivalent to the set of Unix MPMs which anybody has
tried to maintain in recent memory.)
Jeff Trawick [Wed, 25 Mar 2009 08:30:18 +0000 (08:30 +0000)]
Provide ap_set_retained_data()/ap_get_retained_data() for preservation
of module state across unload/load.
The existing idiom used by modules to associate userdata with pglobal
doesn't work in the earliest phases of module execution.
(This does expose pglobal as an implementation detail, but it would be great
to unexpose it if at all possible (but modules already have access to pglobal
at almost all stages of execution anyway).)
Jeff Trawick [Tue, 24 Mar 2009 15:43:59 +0000 (15:43 +0000)]
Introduce a new set of APIs to allow MPMs to be proper modules instead
of integral parts which share global variables, functions, and macros
with the rest of httpd.
Ruediger Pluem [Mon, 23 Mar 2009 17:37:38 +0000 (17:37 +0000)]
* Store the correct server_rec in the connection record configuration and
adjust the remaining part of mod_ssl to use this server_rec instead of
c->base_server.
modules/ssl/ssl_private.h:
- server_rec member to SSLConnRec struct
- Add macros to extract data from connection_rec
mySrvFromConn(c)
mySrvConfigFromConn(c)
myModConfigFromConn(c)
modules/ssl/ssl_engine_io.c
modules/ssl/ssl_util_ocsp.c
modules/ssl/ssl_engine_kernel.c
modules/ssl/mod_ssl.c
modules/ssl/ssl_engine_log.c
- Use the new macros to extract data fron connection_rec
and use the server_rec stored in SSLConnRec instead of
c->base_server whereever appropriate.
Joe Orton [Mon, 23 Mar 2009 15:59:36 +0000 (15:59 +0000)]
* modules/mappers/mod_rewrite.c (apply_rewrite_rule): When evaluating
a proxy rule in directory context, do escape the filename by
default, since mod_proxy will not escape in that case due to the
(deliberate) fixup hook ordering.
Joe Orton [Mon, 23 Mar 2009 13:18:06 +0000 (13:18 +0000)]
* modules/cache/mod_socache_memcache.c,
modules/cache/mod_socache_shmcb.c, modules/cache/mod_socache_dbm.c:
Remove references to "SSL" throughout comments and code.
Joe Orton [Mon, 23 Mar 2009 11:12:23 +0000 (11:12 +0000)]
Prevent a case of SSI timefmt-smashing with filter chains including
multiple INCLUDES filters:
* modules/filters/mod_include.c (add_include_vars): Drop unused
timefmt argument.
(add_include_vars_lazy): Take timefmt argument.
(get_include_var, handle_printenv): Pass time format from context.
Rainer Jung [Fri, 20 Mar 2009 17:42:26 +0000 (17:42 +0000)]
When trying to detect the content type of the
uncompressed content it is often not enough
to read the same number of bytes, we already
read compressed. Since uncompress() allocates a
new buffer, we can increase the number of bytes
to read to the same size, we use in the case,
where the content isn't compressed.
Furthermore zero-terminate the read data to keep
assumptions consistent with the uncompressed case.
Rainer Jung [Fri, 20 Mar 2009 17:37:18 +0000 (17:37 +0000)]
Creating the external gzip process fails, because we
call execve() with "gzip" without full path.
Let's look for it in the PATH instead and drop the
passing of the environment. There seems to be no
reason why gzip should need the httpd environment.
Rainer Jung [Fri, 20 Mar 2009 17:34:25 +0000 (17:34 +0000)]
Creation of external gzip process fails, if we
try to set the working directory to r->filename.
Use ap_make_dirstr_parent() instead, like in all
other similar places.
Roy T. Fielding [Tue, 17 Mar 2009 23:36:27 +0000 (23:36 +0000)]
add application/x-java-jnlp-file
http://java.sun.com/developer/technicalArticles/Programming/jnlp/
(because some companies are too stupid to register a type)
Ruediger Pluem [Tue, 17 Mar 2009 11:10:14 +0000 (11:10 +0000)]
* APR_BUCKET_NEXT is wrong here as we are already a doing a APR_BUCKET_NEXT in
the for loop and this causes us to jump *two* buckets forward. This can cause
us to jump over the Sentinel of the brigade and thus causes an endless loop.
Rich Bowen [Thu, 12 Mar 2009 17:52:51 +0000 (17:52 +0000)]
It's a pet peeve of mine when docs do something, and then say "don't do that."
Remove the hostname from the <VirtualHost> line, and use an IP address
instead.