Commit Graph

60 Commits

Author SHA1 Message Date
2c94ecadce Bring Apache in line with APR's new poll implementation. This isn't
optimal, because it still uses the compatibility functions to make it
work, but it does work.  The next step will be to take the memory for
the pollsets under Apache's control.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96005 13f79535-47bb-0310-9956-ffa450edef68
2002-07-11 05:42:20 +00:00
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
9e3ae2c70a get proxy CONNECT to work on EBCDIC machines
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94997 13f79535-47bb-0310-9956-ffa450edef68
2002-05-07 15:06:32 +00:00
4b3691aa22 Get proxy CONNECT basically working (IE seems to be happy with secure
connections).

The to-do of fixing client I/O so it goes through the filters still
remains.  But it will be nice if it will work until somebody gets
around to doing that.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94971 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 18:47:22 +00:00
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
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
8cf569593b add a ProxyTimeout directive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93117 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 18:46:56 +00:00
08ff4a86f0 In the debug log, say 'decline' instead of 'reject' when DECLINEing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93103 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 12:40:39 +00:00
9757a232c4 for proxy CONNECT handling:
don't hard-code the address family of the target; respect
  what the resolver told us

  get a new socket each time we try to connect to one of the
  target addresses as reported by the resolver; you can't
  portably attempt to connect more than once on the same
  socket

this is the same fix committed to proxy http support yesterday


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92735 13f79535-47bb-0310-9956-ffa450edef68
2002-01-04 18:32:48 +00:00
8a697835fe Get the proxy module compiling again. This is a hack to get past the
current compiler errors.  Basically, the core now puts the socket
in the conn_rec->conn_config vector.  The proxy grabs that socket and
uses it where it used to use the client_socket field from the conn_rec.
Long-term, all of the direct socket communication needs to be removed,
and this should go through a filter stack.  Short-term, this gets the
proxy working again.

I have tested http and connect, but I haven't looked at the FTP proxy,
although it does compile now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91952 13f79535-47bb-0310-9956-ffa450edef68
2001-11-14 21:18:47 +00:00
af3b2ee457 adjust to apr_uri_ rename
Submitted by:	dougm@apache.org
Reviewed by:	ianh@apache.org


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90402 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 16:49:29 +00:00
82290d054d Add a timeout when making connections from within the proxy.
Now, if someone wants to add a special scoreboard state for proxy
attempting to make connection, be my guest.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89908 13f79535-47bb-0310-9956-ffa450edef68
2001-08-03 18:00:38 +00:00
4318882a79 Remove APR_NO_INHERIT as it is now private.
sigh... the cost of being bleeding edge
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89607 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 20:35:13 +00:00
175af69f8e Change the APR_INHERIT flag to APR_NO_INHERIT,which is the default (as recommended by rbb)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89569 13f79535-47bb-0310-9956-ffa450edef68
2001-07-17 21:43:35 +00:00
eef8a5ccff applies change in APR function apr_socket_create, which added a new parameter.
I defaulted these to APR_INHERIT.
Also..
the connection-close was being merged, insted of 'set'
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89559 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 17:54:38 +00:00
0382ec68fa YAPJBUJ.
(Yet Another Proxy Janitor Botched-Up Job).
Need to be looking for APR_SUCCESS here, not HTTP_OK.
Obtained from: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89213 13f79535-47bb-0310-9956-ffa450edef68
2001-05-23 06:43:46 +00:00
2a5472f674 Fixes to proxy, after util-uri move, plus fixes to the .mak file.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89204 13f79535-47bb-0310-9956-ffa450edef68
2001-05-22 19:37:13 +00:00
3032fea185 Allows Mod_proxy to be dynamically loaded on win32 systems
PR:
Obtained from:
Submitted by:	ianh
Reviewed by:	Chuck Murcko, Graham


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89085 13f79535-47bb-0310-9956-ffa450edef68
2001-05-11 17:32:41 +00:00
22ebd698df Split each individual proxy protocol into separate modules.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88866 13f79535-47bb-0310-9956-ffa450edef68
2001-04-15 17:15:29 +00:00
f8425f7b81 Make hooks work for the *_canon() functions. Work continues.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88854 13f79535-47bb-0310-9956-ffa450edef68
2001-04-14 07:03:00 +00:00
0a9f4ce887 Initial support for proxy protocol handler sub-modules. Work continues.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88853 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 23:56:04 +00:00
a5a7858f28 Be type safe, avoid possible buffer overrun
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88850 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 18:57:25 +00:00
6317250229 Not sure what I was thinking, but this clarifies the logic for nbytes >
sizeof(buffer) towards the end of proxy_connect.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88849 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 17:46:54 +00:00
5345c51dbc Fixed all the APR error codes to make sure they end up in the logfiles
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88846 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 15:30:32 +00:00
31bebc7b11 Fix logic in connect handler from previous patch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88845 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 09:34:47 +00:00
d8d03d8aed Fix warnings about byte count type on Darwin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88844 13f79535-47bb-0310-9956-ffa450edef68
2001-04-13 08:12:52 +00:00
eb1d17ebe7 More fixes...
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88780 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 12:06:49 +00:00
f3269d3639 Goodbye more dead code.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88771 13f79535-47bb-0310-9956-ffa450edef68
2001-04-08 22:26:45 +00:00
e95ee6ea59 Stopped the CORE filter from sending off an HTTP response when a
CONNECT tunnel was closed. Fixed some filter definition madness that
proves that I need some sleep.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88770 13f79535-47bb-0310-9956-ffa450edef68
2001-04-08 22:18:31 +00:00
c3cdf7f42f More error checks to make sure the poll() loop dies when the connection
on either side is closed...
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88768 13f79535-47bb-0310-9956-ffa450edef68
2001-04-08 14:52:19 +00:00
97dfaefd92 CONNECT now works!!! Woohoo!!!
the poll() loop was overhauled - many of the reads, writes and selects
were happening on the wrong sockets.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88767 13f79535-47bb-0310-9956-ffa450edef68
2001-04-08 12:54:34 +00:00
a0a3e8f845 Various cleanups and comments
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88766 13f79535-47bb-0310-9956-ffa450edef68
2001-04-08 11:35:54 +00:00
5cbf2b9828 Make the CONNECT proxy talk HTTP/1.1. Still need to check if this is
compliant with HTTP/1.1 though...
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88757 13f79535-47bb-0310-9956-ffa450edef68
2001-04-07 21:12:39 +00:00
62b643a64b *) Made log entries consistent with proxy: CONNECT:
*) checked that sockets were being closed on error
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88756 13f79535-47bb-0310-9956-ffa450edef68
2001-04-07 21:09:37 +00:00
20b09156c9 proxy_connect.c needs ap_parse_hostinfo_components() to decode the URI,
not ap_parse_uri_components()
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88755 13f79535-47bb-0310-9956-ffa450edef68
2001-04-07 20:57:05 +00:00
5dd4149bc0 Converted send_dir() to ap_proxy_send_dir_filter() in proxy_ftp.c.
Fixed up the header files
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88739 13f79535-47bb-0310-9956-ffa450edef68
2001-04-06 10:44:08 +00:00
5f3bc1ebc9 Some code rewriting in ap_proxy_connect_handler():
*) Fixed bug where a hostname without a "." in it (such as "localhost")
would not trigger an IP address check with ProxyBlock.
*) Fixed ProxyBlock bugs with ap_proxy_http_handler() and
ap_proxy_connect_handler().
*) Updated ap_proxy_connect_handler() to support APR, while
moving some common code between http_handler and connect_handler
to proxy_util.c.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88721 13f79535-47bb-0310-9956-ffa450edef68
2001-04-04 18:47:42 +00:00
b924ea846d Fixing a few compiler warnings with mod_proxy
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88659 13f79535-47bb-0310-9956-ffa450edef68
2001-04-02 21:19:22 +00:00
d72c7d938e *) Added support for downstream keepalives in mod_proxy.
*) Changed mod_proxy ap_proxy_http_handler() to support APR properly.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88648 13f79535-47bb-0310-9956-ffa450edef68
2001-04-02 17:04:19 +00:00
4fe4de4e33 reorganize STATUS; update copyright
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88534 13f79535-47bb-0310-9956-ffa450edef68
2001-03-19 08:54:41 +00:00
9d85d10c10 Fix any compile breaks after moving apr_snprintf and apr_vsnprintf to
apr_strings.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88077 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 00:12:43 +00:00
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
0caf561799 Call apr_create_socket() instead of apr_create_tcp_socket() (deprecated).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87025 13f79535-47bb-0310-9956-ffa450edef68
2000-11-19 14:27:45 +00:00
e56d9d5baf Begin to remove some of the cache-ing logic from the http proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87013 13f79535-47bb-0310-9956-ffa450edef68
2000-11-18 17:13:29 +00:00
b227aa8c6e Remove BUFF from the CONNECT handler. This works as well as the rest
of the proxy, meaning that it has proxied a page.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86967 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 23:58:54 +00:00
2b8f7395d7 Changes for previous ap_proxy_doconnect() calling
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86963 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 19:32:03 +00:00
cac411d0cc Make proxy_connect.c compile cleanly again. Not sure if it works or not,
but it does compile.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86926 13f79535-47bb-0310-9956-ffa450edef68
2000-11-11 17:51:58 +00:00
31c42a957c This is the 1.3.x current proxy into 2.0 - first stage
PR:
Obtained from: Sam Magnuson
Submitted by:  Chuck Murcko
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86923 13f79535-47bb-0310-9956-ffa450edef68
2000-11-11 11:07:03 +00:00
260f2cb9c8 Remove all compiler warnings from the proxy code. There are no garauntees
that this still works, but most of the changes were just const-safeness
changes.
PR:	6631


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86440 13f79535-47bb-0310-9956-ffa450edef68
2000-10-08 03:23:05 +00:00
ae7cca1bd9 Remove IOLs from Apache. They are no longer necessary, now that we have
filtering beginning to work.  There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF.  Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back.  Because we don't actually have pipe buckets yet, we are using this
hack.  When we get pipe buckets, this will be fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
2000-08-23 00:01:58 +00:00