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

170 Commits

Author SHA1 Message Date
Jeff Trawick
10406b4ad2 Fix a couple of mod_proxy problems forwarding HTTP connections:
(1) PR #9190  It failed to connect to IPv6 hosts.
(2) It failed to connect when the first IP address returned by
    the resolver was unreachable but a secondary IP address was.

PR:    9190 (partly)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92727 13f79535-47bb-0310-9956-ffa450edef68
2002-01-04 01:47:55 +00:00
Bill Stoddard
816e3717cf Keep my comments to myself.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92725 13f79535-47bb-0310-9956-ffa450edef68
2002-01-03 20:47:30 +00:00
Bill Stoddard
dd4b6e71aa Use ap_getline() in favor of ap_proxy_string_read() in ap_proxy_http_process_response().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92723 13f79535-47bb-0310-9956-ffa450edef68
2002-01-03 20:38:04 +00:00
Bill Stoddard
bfa4490273 Fix mod_proxy seg fault when the proxied server returns
an HTTP/0.9 response or a bogus status line.

Submitted by: Adam Sussman
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92693 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 21:03:12 +00:00
Bill Stoddard
dbdc5a2978 Prevent mod_proxy from truncating one character off the
end of the status line returned from the proxied server.
Note that buffer is NULL terminated by the call to
ap_proxy_string_read() so there is no need to terminate it
again.

Submitted by:	Adam Sussman
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92692 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 20:53:28 +00:00
Bill Stoddard
826df1bb82 Change the call to be blocking to eliminate a loop caused when the upstream
host does not send any bytes back our way.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92691 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 20:46:22 +00:00
Ryan Bloom
57f5bf7a31 Remove an extra semi-colon.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92534 13f79535-47bb-0310-9956-ffa450edef68
2001-12-19 16:32:01 +00:00
Jeff Trawick
c85d4a7c86 get proxy in sync with the update to ap_run_create_connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92520 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 20:29:27 +00:00
Ian Holsman
0b318ea68b Add extra If-XXX request headers to be ignored in subrequests
Allow cache-control header to get passed to subrequests
tabs -> spaces

Submitted by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92030 13f79535-47bb-0310-9956-ffa450edef68
2001-11-18 16:59:38 +00:00
Ian Holsman
0651b89988 Only do keepalives (and keep state on the connection record) if this request
is the top-level page.

Do not pass If-XXX-Since headers to the r-proxied server on a subrequest,
and we can't handle a 30X response


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92022 13f79535-47bb-0310-9956-ffa450edef68
2001-11-17 22:04:48 +00:00
Ryan Bloom
5a49046151 Quiet a compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91953 13f79535-47bb-0310-9956-ffa450edef68
2001-11-14 21:55:58 +00:00
Ryan Bloom
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
Cliff Woolley
468199afcb Remove the returned-length "w" parameter from apr_bucket_heap_create()
and apr_bucket_heap_make().  It was useless, since the length is invariant
from the length passed in and from the resulting bucket's b->length.  This
takes care of a long-standing issue first brought up in February and
discussed on the dev@apr list.  (Issue #2 from the "Bucket API Cleanup
Issues" thread.)

See http://marc.theaimsgroup.com/?l=apr-dev&m=98324983126666&w=2

Reviewed by:    Ryan Bloom (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91866 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 03:23:12 +00:00
Ian Holsman
eea38d7c2e This patch changes the apr_table_elts macro so that it provides
access to the internals of an apr_table_t via a const pointer
instead of the current non-const pointer.


Submitted by:	Brian Pane <BPane@pacbell.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91860 13f79535-47bb-0310-9956-ffa450edef68
2001-11-11 22:31:04 +00:00
Ian Holsman
f1c45242ca Fix so that errordocument works when a error gets returned from the
proxy.
Problem was ErrorHandler thought it was in some kind of recursion and
couldn't find the custom error document
Obtained from: Jin Hong <jinh@cnet.com>
Submitted by:
Reviewed by:   Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91757 13f79535-47bb-0310-9956-ffa450edef68
2001-11-05 23:06:55 +00:00
Aaron Bannert
1087db6a1d Fix a truncation bug in how we print the port on the Via: header.
The routine that prints the Via: header now takes a length for
the port string.

Submitted by:	Zvi Har'El <rl@math.technion.ac.il>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91682 13f79535-47bb-0310-9956-ffa450edef68
2001-10-29 15:44:03 +00:00
Justin Erenkrantz
e1438a2d7c Fix the first bucket not getting chunked properly. The reason was that
we left the TE header in the output headers, so ap_set_keepalive didn't
set r->chunked to 1.  So, ap_http_header_filter wouldn't insert CHUNK
filter appropriately.  I have no clue how it chunked anything at all
before this patch, but hey, it looks right now.

Tested with Yahoo, Apple, apache.org, and /.
/. is interesting in that it sends both Conn: Close and TE: chunked.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91463 13f79535-47bb-0310-9956-ffa450edef68
2001-10-14 20:41:00 +00:00
Justin Erenkrantz
fd1950344a Lose the magic number and use the central #define AP_IOBUFSIZE.
Hey, I've never seen it in actual use anywhere, so I didn't know.

Thanks to Roy for pointing it out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91440 13f79535-47bb-0310-9956-ffa450edef68
2001-10-12 02:00:41 +00:00
Justin Erenkrantz
22c9145d8d Teach mod_proxy to live with the new filtering scheme.
Tested with www.yahoo.com (Conn: Close), www.apache.org (CL), and
www.apple.com (TE: Chunked).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91436 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 20:03:26 +00:00
Ian Holsman
dd713bba3b dechunking filter removed.
add HTTP_IN filter after the headers have been parsed.
so that the HTTP_IN can check them ;-)
Still not 100% if this works properly, but I don't get
the chunking numbers displayed on my browser,
so it's better than what was there.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91370 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 21:49:17 +00:00
Ian Holsman
4bd8279a92 initial port of new Request-mode HTTP_IN filter to proxy.
Status: It serves a reverse-proxy page.. but SLOWLY.
VERY SLOWLY.
still looking at why, but now it serves pages instead of dumping core.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91363 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 19:25:35 +00:00
Graham Leggett
0617f1c78f Some style cleanups related to the ProxyErrorOverride function.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91171 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 10:23:32 +00:00
Cliff Woolley
ed3a5bc69e Immortal data should go in an immortal bucket, not a pool bucket. It would
still work in a pool bucket, but only by coincidence.  At the very least, a
pool bucket is way more overhead than this poor unsuspecting little CRLF
needs to get by.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91160 13f79535-47bb-0310-9956-ffa450edef68
2001-09-27 04:01:10 +00:00
Ian Holsman
ae877f9e70 change command name so that it starts with 'Proxy'
fix the command so that it returns 'OK' instead of 'HTTP_OK'

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91155 13f79535-47bb-0310-9956-ffa450edef68
2001-09-26 19:58:10 +00:00
Victor J. Orlikowski
0f20722276 Clean up a compile warning on AIX.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91094 13f79535-47bb-0310-9956-ffa450edef68
2001-09-20 14:23:06 +00:00
Ian Holsman
65d5d7b65c Added New Option 'HTTPProxyOverrideReturnedErrors' which lets the server override
the error pages returned from the proxied server and replace them with the standard
server error handling on the main server.

Reviewed by:	Graham, Chuck


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91092 13f79535-47bb-0310-9956-ffa450edef68
2001-09-20 05:34:50 +00:00
William A. Rowe Jr
fb96a6c13a Undo another int type'ed port (and format a little structure for legibility).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90820 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 19:48:02 +00:00
Ian Holsman
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
Ian Holsman
c802a1d599 MSVC can't seem to handle
int buffer_len = 1;
        char test_buffer[buffer_len];


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90367 13f79535-47bb-0310-9956-ffa450edef68
2001-08-19 20:21:07 +00:00
Ryan Bloom
e0ee364ee8 initialize some values on variable creation
Submitted by:	John Barbee <barbee@veribox.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90290 13f79535-47bb-0310-9956-ffa450edef68
2001-08-17 17:12:18 +00:00
Victor J. Orlikowski
923914d969 Fix behavior in the event that a socket is closed.
Submitted by: barbee@veribox.net
Reviewed by: orlikowski@apache.org


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90264 13f79535-47bb-0310-9956-ffa450edef68
2001-08-17 01:38:16 +00:00
Victor J. Orlikowski
911fea9631 Fix a char * vs char ** mixup...
Submitted by: barbee@veribox.net


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90171 13f79535-47bb-0310-9956-ffa450edef68
2001-08-15 18:36:05 +00:00
Ryan Bloom
981021f917 Break http_proxy_handler into multiple smaller functions.
Submitted by:	John Barbee <barbee@veribox.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90159 13f79535-47bb-0310-9956-ffa450edef68
2001-08-14 18:04:58 +00:00
Chuck Murcko
b4118f1e32 Make the body read in proxy http handler nonblocking. There's no sense
in serializing 4-8 client connections into a single origin server
connection, as is the blocking behavior.

Added instrumentation that we don't want compiled in normally to assist in
debugging chunking problems. apr_get_brigade is apparently blocking during
chunked body fetch, or proxy_http_handler is getting deadlocked with
the dechunk filter. Show PID for prefork debugging. We'll figure out
getting TIDs later.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90127 13f79535-47bb-0310-9956-ffa450edef68
2001-08-12 21:24:35 +00:00
Ryan Bloom
2baa3fe4ff Fix the proxy when the origin server sends back a 100
Continue response.  [John Barbee <barbee@veribox.net>]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90092 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 05:10:23 +00:00
Ian Holsman
81be3f5ebe change readbytes from a apr_size_t to a apr_off_t to match the parameter
required in ap_get_brigade
Submitted by:	 barbee@veribox.net
Reviewed by:	 ianh@apache.org


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90012 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 21:46:47 +00:00
Victor J. Orlikowski
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
Victor J. Orlikowski
b64a6e878e Both the ftp and http proxies were erroneously sending a flush bucket after
an eos bucket. This had been put in place to repair a bug, but was covering
the symptoms, rather than providing the cure. Bug repaired, and kludge
removed.

Submitted by: barbee@veribox.net


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89907 13f79535-47bb-0310-9956-ffa450edef68
2001-08-03 16:25:10 +00:00
Victor J. Orlikowski
5b38785f4b Being slightly picky: properly namespace protect make_fake_req()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89837 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 19:12:56 +00:00
Ian Holsman
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
Ian Holsman
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
Ian Holsman
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
Ian Holsman
9467f6ad75 Last Log entry was bogus.
Changed to 'setting' the X-Forwarded-Server X-Forwarded-Host X-Forwarded-For
headers instead of merging them
PR:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89551 13f79535-47bb-0310-9956-ffa450edef68
2001-07-14 20:18:45 +00:00
Ian Holsman
f99ed71713 PR:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89550 13f79535-47bb-0310-9956-ffa450edef68
2001-07-14 20:17:07 +00:00
Victor J. Orlikowski
3bb89937f4 Remove a couple of extraneous calls to apr_brigade_cleanup()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89489 13f79535-47bb-0310-9956-ffa450edef68
2001-07-02 03:37:37 +00:00
Chuck Murcko
6383dfad3b Fix abort code path for HTTP proxy. Similar to Victor's patch for FTP
proxy. No, Julia, it really *is* a double negative.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89486 13f79535-47bb-0310-9956-ffa450edef68
2001-06-30 04:50:31 +00:00
Chuck Murcko
bd71fdf9ac Use apr-util's date functions now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89280 13f79535-47bb-0310-9956-ffa450edef68
2001-06-06 21:51:58 +00:00
Victor J. Orlikowski
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
Victor J. Orlikowski
a040b3c7bf Bletch. The Proxy Janitor botches the job again.
Thanks to Ian Holsman for the catch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89210 13f79535-47bb-0310-9956-ffa450edef68
2001-05-23 03:39:44 +00:00
Victor J. Orlikowski
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