1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

339 Commits

Author SHA1 Message Date
Martin Kraemer
9e5f5087f1 * Prefer compatibility with both HTML-4 and XHTML (rather than XHTML only)
* Properly escape URIs and HTML in the FTP filename list
* Avoid a pointer underrun


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93075 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 15:31:28 +00:00
Martin Kraemer
4beff4570f Add some more apr_ types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93074 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 15:27:30 +00:00
Martin Kraemer
7ec0ceeda8 First step: send proxy_ftp.c thru
indent | pr -e8 -t
(no other changes)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93059 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 16:54:05 +00:00
Bill Stoddard
327e4989d5 Remove the create_connection hook and put the client_socket back into the
conn_rec. The create_connection_hook has a design flaw that prevents it
from making decisions based on vhost information.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 12:52:08 +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
Jeff Trawick
cf5f58a851 Fix a problem in the parsing of the <Proxy foo> directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92882 13f79535-47bb-0310-9956-ffa450edef68
2002-01-17 02:22:22 +00:00
William A. Rowe Jr
7f6d76ce95 Follow our Unix bretherens' conventions, and name the sub-proxy modules
with the mod_ prefix (al la mod_dav_fs as a sub-dav module.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92876 13f79535-47bb-0310-9956-ffa450edef68
2002-01-17 01:05:23 +00:00
William A. Rowe Jr
aff1454d34 *) Split all Win32 modules [excluding the core components mod_core,
mod_so, mod_win32 and the winnt mpm] into individual loadable
     modules, so the administrator may individually disable the former
     compiled-in modules by simply commenting out their LoadModule
     directives.  [William Rowe]

  *) Saved Win32 module authors and porters many future headaches, by
     duplicating the appropriate .h files such as os.h into the include
     directory, including in the build tree.  [William Rowe]

  Also noticed that version stamp resources weren't generated for proxy
  modules, this too is now fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92804 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 08:47:23 +00:00
Jeff Trawick
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
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
Jeff Trawick
64a3040e8a get the declarations for strncasecmp() on AIX
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92724 13f79535-47bb-0310-9956-ffa450edef68
2002-01-03 20:42:08 +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
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
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
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
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
Victor J. Orlikowski
f7258724c4 No point in linking the proxy objects with the submodules.
However, proxy is not working on AIX since the rtl changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92507 13f79535-47bb-0310-9956-ffa450edef68
2001-12-17 23:57:46 +00:00
Bradley Nicholes
72a5a2a026 Got rid of an annoying uninitialized variable compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92266 13f79535-47bb-0310-9956-ffa450edef68
2001-11-30 19:17:47 +00:00
Ian Holsman
6084f225f4 r->headers_in is shared by original requests and components (make no sense
copy them for components), but each component has its own r->pool.
So once the first component set "Max-Forwards", it is in headers_in
but the value could get lost with the first component's r->pool.
Hence I sometimes see "Max-Forwards" has value like letter "l".
Change it to use apr_table_set() fixed the problem.

Submitted by:	Jin Hong <jinh@cnet.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92253 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 21:09:31 +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
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
b9ca9e6b47 should this file be used or the main httpd one?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92023 13f79535-47bb-0310-9956-ffa450edef68
2001-11-17 22:07:15 +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
Ian Holsman
a052762e84 ProxyPass wasn't sending the right URL through to the backend server
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92021 13f79535-47bb-0310-9956-ffa450edef68
2001-11-17 22:01:32 +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
William A. Rowe Jr
e289e87c82 And where, praytell, should mod_proxy.c find ap_send_http_options
and ap_send_http_trace?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91561 13f79535-47bb-0310-9956-ffa450edef68
2001-10-19 05:01:13 +00:00
Ryan Bloom
6eb1adeb1d The proxy does not actually need this header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91549 13f79535-47bb-0310-9956-ffa450edef68
2001-10-18 19:51:49 +00:00
William A. Rowe Jr
4608aab1d6 As GStein points out... comment here would be helpful
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91544 13f79535-47bb-0310-9956-ffa450edef68
2001-10-18 13:12:32 +00:00
William A. Rowe Jr
1eda89f095 Hmmm... mismatched namespaces :-?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91489 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 14:45:56 +00:00
Ryan Bloom
e31a688ce5 Cleanup the proxy code that creates a request to the origin
server.  This change adds an optional hook, which allows modules
to gain control while the request is created if the proxy module
is loaded.  The purpose of this hook is to allow modules to add
input and/or output filters to the request to the origin.  While
I was at it, I made the core use this hook, so that proxy request
creation uses some of the code from the core.  This can still be
greatly improved, but this is a good start.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91486 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 05:18:39 +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
William A. Rowe Jr
af7425b447 Aye, it's bogus. Something very odd about short terniary results on
this C[++] compiler here, wants to promote to the conditition's type :-/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91424 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 14:04:11 +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
William A. Rowe Jr
c241623544 Should be no change to the execution - simply clean up two compiler
warnings, signed/unsigned mismatch in != and mismatched type for port.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91214 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:45:11 +00:00
William A. Rowe Jr
efc6237983 We don't mind the .mak files hanging around, don't tell us about it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91183 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 17:50:22 +00:00