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

672 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Jeff Trawick
7d99a3c077 Fix handling of IPv6 numeric strings in mod_proxy.
(Some such operations would work if port was specified
in url due to way parsing was performed, finding last ':'
and considering everything after as the port.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103698 13f79535-47bb-0310-9956-ffa450edef68
2004-05-19 13:30:14 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
3d75c8c079 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102572 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:27:14 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Graham Leggett
c3123a7c08 Fixed a segfault when multiple ProxyBlock directives were used.
PR:		19023
Obtained from:
Submitted by:	Sami Tikka <sami.tikka@f-secure.com>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99363 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 16:01:02 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jim Jagielski
62f1105335 Haven't heard any vetoes regarding this, so might as well fold it
in. Not too happy about cluttering up the list of directives either.
But, at least, it allows 2.0 to proxy stupid IIS as much as 1.3.
Docs to come soon.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97202 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 14:11:24 +00:00
Ian Holsman
1ef12234c2 make the output XHTML
Submitted by : Erik Abele <erik@codefaktor.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96528 13f79535-47bb-0310-9956-ffa450edef68
2002-08-25 20:40:11 +00:00
William A. Rowe Jr
ed8fc9abae http occurances to update for apr_socket_opt_get/set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96057 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 08:05:11 +00:00
William A. Rowe Jr
6b69fe06c0 Timeout/time fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96055 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 07:46:19 +00:00
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +00:00
William A. Rowe Jr
f8511d81d8 No crutches, people!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95854 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:06:25 +00:00
William A. Rowe Jr
3f6aa521eb Cleanup proxy timeouts a bit to remove emits and make consistent to
vhost timeout.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95674 13f79535-47bb-0310-9956-ffa450edef68
2002-06-14 17:14:57 +00:00
William A. Rowe Jr
7af68c0bf5 Solve the 80/20 by initializing and storing server_rec->timeout and
server_rec->keep_alive_timeout in apr_time_interval_t format (in apr
  units, whatever they be), as both values exist to pass into APR, and
  all APR timeouts are in apr_time_t.

Reviewed by:	Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95623 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 23:59:31 +00:00
Jeff Trawick
50bac91072 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95150 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:24:17 +00:00
Jeff Trawick
d439ef140b get mod_proxy to build on EBCDIC machines
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94808 13f79535-47bb-0310-9956-ffa450edef68
2002-04-25 22:12:51 +00:00
Graham Leggett
22d4e9ea8b Quick fix to an incorrect comment.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94501 13f79535-47bb-0310-9956-ffa450edef68
2002-04-06 12:43:47 +00:00
Doug MacEachern
cf7be3d0b6 PR:
Obtained from:
Submitted by:
Reviewed by:	Ryan Bloom
remove call to ap_proxy_reset_output_filters() and the function itself.
this call breaks ssl proxy when the client is using keepalives.
this function is also no longer needed with recent-ish filter changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94383 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 04:30:49 +00:00
Jeff Trawick
eab06b27db fix some abuse of apr_port_t (flagged by Sun WorkShop)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94142 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 21:41:14 +00:00
Graham Leggett
19c0213612 Change the header merging behaviour in proxy, as some headers
(like Set-Cookie) cannot be unmerged due to stray commas in
dates.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94083 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 12:05:45 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Jeff Trawick
1151bac94b implement a common function for getting a socket and trying to connect
to the target host; use that common function for proxy HTTP and proxy
CONNECT

In that new function, fix this problem:

     Proxy HTTP and CONNECT: Keep trying other addresses from the DNS
     when we can't get a socket in the specified address family.  We may
     have gotten back an IPv6 address first and yet our system is not
     configured to allow IPv6 sockets.

An example host is www.ipv6.org.  The first address I get back is
an IPv6 address, but my machine may not be configured to allow an
AF_INET6 socket.

Before the fix: The apr_socket() failure was fatal.
After the fix:  When apr_socket() fails, we go to the next address from
                the resolver, successfully create a socket in the
                specified family (AF_INET), and all is well.

(an unrelated fix in this commit was to pass a server_rec in a broken
ap_log_error() call)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93787 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 02:03:47 +00:00
Ryan Bloom
94c63c92a8 We need to setup protocol filters for the fake request. If we don't,
then when any request filters are added, the connection filters will be
lost.  This fixes the proxy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93752 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 06:07:25 +00:00
Jeff Trawick
e8b6f67b6a fix the linkage of and add a prototype for ap_proxy_table_unmerge()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93529 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 11:42:03 +00:00
Graham Leggett
23bad0a329 Some browsers ignore cookies that have been merged into a
single Set-Cookie header. Set-Cookie and Set-Cookie2 headers
are now unmerged in the http proxy before being sent to the
client.
Fix a problem with proxy where each entry of a duplicated
header such as Set-Cookie would overwrite and obliterate the
previous value of the header, resulting in multiple header
values (like cookies) going missing.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93527 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 06:06:31 +00:00
Bill Stoddard
4bc1733b38 Cleanup some fallout from the recent install_transport_filters commit.
Deprecate ap_proxy_pre_http_connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93093 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 04:34:11 +00:00
Justin Erenkrantz
94d01b65aa Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length.  This is
much more consistent.  Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length.  This makes it now possible to
pass constants down without assigning them to a temporary variable first.

Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
  some circumstances


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93014 13f79535-47bb-0310-9956-ffa450edef68
2002-01-25 01:11:47 +00:00
Justin Erenkrantz
7d32242a14 Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.

We also no longer look at readbytes to determine the method of
filter operation.  This makes the use of filters more obvious and
allows a wider range of options for input filters modes.

To start with, the new input filter modes are:

AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)

The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ

This also allows cleanup of mod_ssl's handling in the getline case.

Reviewed by:	Ryan Bloom (concept), Greg Stein (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92928 13f79535-47bb-0310-9956-ffa450edef68
2002-01-19 07:45:18 +00:00
Bill Stoddard
59550522ce Fix seg fault in HTTP_IN when trying to handle the LimitRequestBody
directive when reading a proxy response. We should bypass LimitRequestBody
activities when handling a response from the proxied server.

I don't think this will circumvent requestbody checking on a large request
coming into the server that is destined to be proxied. (not tested though).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92722 13f79535-47bb-0310-9956-ffa450edef68
2002-01-03 19:20:54 +00:00
Bill Stoddard
55954a1d64 Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems
to be a bit more descriptive. Move the check to inside the inner while()
loop and add an additional check for eos. If we get an EOS bucket, there
is no point in going further. Hopefully this will fix the last seg fault
in the function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92704 13f79535-47bb-0310-9956-ffa450edef68
2002-01-02 19:12:40 +00:00
Bill Stoddard
b9b1b1a76d Eliminate loop in ap_proxy_string_read(). Need to be able to handle
getting an empty brigade from ap_get_brigade(). Also made sure that
we always call ap_get_brigade() in readline mode.

Submitted/Reviewed by: Adam Sussman & Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92690 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 20:43:59 +00:00
Bill Stoddard
1741233a02 Detabify some functions. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92651 13f79535-47bb-0310-9956-ffa450edef68
2001-12-29 20:32:52 +00:00
Ian Holsman
e1e621b3d4 make the proxy code spit out an error to the error log.
This bit me when I included a 11th file no error message, nothing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92226 13f79535-47bb-0310-9956-ffa450edef68
2001-11-28 21:07:32 +00:00