1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

583 Commits

Author SHA1 Message Date
William A. Rowe Jr
ae18ec32a1 Added close_on_recycle flags for creatin connections.
This flag enables to distinguish between connection types.
Also added a pool cleanup bound to connection pool that recycles
the connection when client disconnects from server.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104599 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:39:02 +00:00
William A. Rowe Jr
6cc26c2656 Added acquire and release connection functions.
The acquire pulls the connection from the pool.
The release returns the connection to the pool.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104598 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:37:08 +00:00
William A. Rowe Jr
62ccd6ca6a Added ap_proxy_connection_create function that makes
conn_rec for opened connection. It is used bt http(s) and ftp for
bounding the backend connection to client connection with the same id's.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104597 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:36:28 +00:00
William A. Rowe Jr
5faf9c3c49 Added KeepAlive worker option.
The scheme handler will override this setting if required, depending on the
protocol itself and keepalive_set flag.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104596 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:35:19 +00:00
William A. Rowe Jr
5ead791f0e Add ap_proxy_connect_backend that will replace
ap_proxy_connect_to_backend. It uses worker params for setting socket
options and checks for conection's connect status.
It works both on empty and acquired connections.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104595 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:34:26 +00:00
William A. Rowe Jr
6c7efc889b Added iobuffersize and receivebuffersize to be worker specific.
As for timeout their default value is from proxy_conf.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104594 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:33:07 +00:00
William A. Rowe Jr
ae33d99379 Change the way the prefork connection is created.
Use the same constructor as for theaded mpm's.
Added API's for destroying and closing connections

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104593 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:32:22 +00:00
William A. Rowe Jr
a603a36021 Added timeout_set for worker. Each worker can have a different timeout
the ProxyTimout sets. Also changed proxy_conf's timeout_set to int.

Use timeout_set for worker inherited from ProxyTimeout but overridable
using timout=xxx

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104592 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:31:46 +00:00
William A. Rowe Jr
c25b89a720 Added acquire timeout for obtaining resources from reslist.
The timeout is in milliseconds to enable quick return in case the
reslist is exceded the maximum number of connections.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104591 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:30:06 +00:00
William A. Rowe Jr
66239a82ef Remove proxy_mdule_conf.
We will change the scheme hook api to include the worker.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104590 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:28:59 +00:00
William A. Rowe Jr
3cc146e42b Remove proxy_conn struct and add it's params to proxy_conn_rec.
Use named structure type declarations.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104589 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:27:34 +00:00
William A. Rowe Jr
fd82a02ec8 Add worker timeout inherited from ProxyTimeout.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104588 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:16:27 +00:00
William A. Rowe Jr
385f71e758 Use the worker pool for creating proxy_conn_poll to suppress it's
destruction when cleaning worker.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104587 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:15:23 +00:00
William A. Rowe Jr
504d6da5ab Arrange the handling of apr_array_header_t arrays.
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104586 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:14:49 +00:00
William A. Rowe Jr
c460a77e84 Make proxy_conn always accesible for preforked MPM and
APR_HAS_THREADS enabled.

Add init_conn_worker for creating apr_reslist that maintains connection
pool. For prefork mpm's use the single connection container.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104585 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:13:50 +00:00
William A. Rowe Jr
5b93a5f53c Add some source comments about worker DNS lookup.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104584 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:12:02 +00:00
William A. Rowe Jr
4d04100701 Remove unusable code. The constructor and destructor will
be in proxy_util.  Add a trace.

Submitted by:  mturk, jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104583 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:10:23 +00:00
William A. Rowe Jr
9e6393182e Added ap_proxy_determine_connection.
It will be used both for http and ajp handlers.
Started writing apr_reslist connection pool.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104582 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:05:20 +00:00
William A. Rowe Jr
ad3071fe06 Use pre_pequest function and set proxy_module_conf bound to client
connection so it cen be obtained inside scheme handlers.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104579 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:01:55 +00:00
William A. Rowe Jr
f9596ca564 Add ap_proxy_pre_request API function.
It calls the actual module pre_request hook if present

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104578 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:00:47 +00:00
William A. Rowe Jr
7063433b15 dup real and fake
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104577 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:59:48 +00:00
William A. Rowe Jr
01f7f51f5b Add pre_request and post_request proxy hooks.
They will be mainly used for loadbalancers for finding and maintaining workers.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104576 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:56:38 +00:00
William A. Rowe Jr
4c283844ab Make sure that APR_MAJOR_VERSION is defined.
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104575 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:49:40 +00:00
William A. Rowe Jr
eb8b42d09b Remove all worker/balancer API's to proxy_util.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104574 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:46:54 +00:00
William A. Rowe Jr
df8b1de9b3 Missed a 2.0-HEAD proxy back-compat patch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104573 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:45:53 +00:00
William A. Rowe Jr
d38ce6988e Added API for creating balancers.
Added property  setter for balancers.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104572 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:44:23 +00:00
William A. Rowe Jr
386cc09c53 Use RAW_ARGS instead ITERATE.
Add options for connection pool when using ProxyPass

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104571 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:30:57 +00:00
William A. Rowe Jr
8dda80bccc Move worker params parsing to a separate function.
The same will be used for creating ProxyPass connection pools.

Added ttl param to worker for maintaining reslist.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104570 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:29:57 +00:00
William A. Rowe Jr
e881f5cc72 Move min,smax and hmax params to worker, so they can be set
before the connection pool is created

Added init_conn_pool to worker.
Connection pool will either use reslist (if thread number > 1)  or single connection.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104569 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:27:57 +00:00
William A. Rowe Jr
c47f5cbc72 Obtain balancer using API.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104568 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:26:03 +00:00
William A. Rowe Jr
55bdb14eb5 Use API instead directly obtaining worker and balancer.
Add BalancerStickySession and BalanceMember directives.
Add workers and balancers to create and merge config.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104567 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:25:15 +00:00
William A. Rowe Jr
cbdfbe5cbb Add initial structures for connection pool and load balancer.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104566 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:20:07 +00:00
William A. Rowe Jr
1d2047b9d5 Enable backwards compatibility with 2.0-HEAD, define ajp module base,
and note CHANGES so far to proxy

Submitted by:	mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104565 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 21:14:49 +00:00
William A. Rowe Jr
00e08062c1 Well, we still need that casting :)
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104564 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:48:40 +00:00
William A. Rowe Jr
0ee93490bb Use ajp scheme when doing canonicalise.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104563 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:48:15 +00:00
William A. Rowe Jr
831061aa27 Rename parse_headers to parse_header.
Some renaming and style cleanup.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104562 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:46:29 +00:00
William A. Rowe Jr
3eaf1a226c Close only when needed.
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104561 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:44:40 +00:00
William A. Rowe Jr
8d4e9e7eca Use protocol handler defines instead fixed numbers.
Makes more sense what's happening.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104560 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:44:08 +00:00
William A. Rowe Jr
2183c81376 Added include "ajp.h", and made some casting
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104559 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:43:05 +00:00
William A. Rowe Jr
f9d74acee9 Add the logic to read the body.
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104558 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:42:00 +00:00
William A. Rowe Jr
ced378ded2 Clean useless code.
Submitted by: jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104557 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:41:23 +00:00
William A. Rowe Jr
900bd3c260 Introduce proxy_ajp.c : use --enable-proxy-ajp with configuring Apache.
To load it:
+++
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+++

And to use it something like:
+++
<Location /examples/>
ProxyPass ajp://backend.example.net:8009/examples/
</Location>
+++

proxy_ajp will not be enabled by default due to ./ajp dependencies

Build magic improvements: mturk, wrowe

Submitted by:  jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104556 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 20:29:46 +00:00
Graham Leggett
0fa986980f Fixes the build of proxy on Windows. Since the proxy_module is declared
as extern using AP_MODULE_DECLARE_DATA that expands to dllexport, there
is a LNK2001 error when building proxy_http.
PR:
Obtained from:		Mladen Turk <mturk@apache.org>
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104469 13f79535-47bb-0310-9956-ffa450edef68
2004-08-04 00:32:07 +00:00
André Malo
f8635f92c7 style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104169 13f79535-47bb-0310-9956-ffa450edef68
2004-07-04 22:47:49 +00:00
André Malo
c3ddf34b96 badly encoded urls could cause a null byte skipping (read buffer overflow).
(e.g. % as last character).
avoid that.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104168 13f79535-47bb-0310-9956-ffa450edef68
2004-07-04 22:39:06 +00:00
André Malo
2cd26158d3 style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104167 13f79535-47bb-0310-9956-ffa450edef68
2004-07-04 22:24:52 +00:00
André Malo
50a54c9e9b fix a bunch of compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104153 13f79535-47bb-0310-9956-ffa450edef68
2004-07-03 16:23:09 +00:00
Jeff Trawick
b0d1112a81 style fix only
(previously committed from user-supplied patch)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104148 13f79535-47bb-0310-9956-ffa450edef68
2004-07-03 12:25:11 +00:00
Martin Kraemer
7f9a011ae3 *** Patch for EBCDIC-host and HTTP/0.9 responses only ***
In dealing with a HTTP/0.9 response to a proxy request, we have pre-read
data that is not an HTTP header. At this point of processing, we don't
know yet whether the data is going to be interpreted an binary or not.
(In fact, we may never find out because HTTP/0.9 lacks the Content-Type
headers; only by configuring mod_charset_lite can we control the conversion).
But mod_charset_lite will get control only later, so it cannot decide on
the conversion of the current buffer full of data.
=> This is an extreme and rare situation normally.
So, for catching the most obvious problem (talking not to a HTTP server
but to some other protocol), the best guess here is to treat the buffer
as "text/*" (to make error messages readable).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104081 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 14:00:07 +00:00
Nick Kew
b6e89d86f7 Fix for multiple proxy bugs - review please:
#10722  Reverse proxying cookies
#15207  Proxy passing canonicalised URIs to backend
#16812  Case-insensitivity of proxypassreverse
#19317  Canonicalised URI causing infinite loop
#20372  AllowEncodedSlashes
May also fix 13577 (untested)

This is really two fixes: 10722 and 15207; the others are trivial consequences.
To make review easier, the simpler fix (#15207) is entirely contained in
#ifdef FIX_15207 (new code) and
#ifndef FIX_15207 (removed code)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104070 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 06:37:21 +00:00