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
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
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
#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
(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
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
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
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
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
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
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
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
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
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
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
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