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

198 Commits

Author SHA1 Message Date
Mladen Turk
5cc48386c4 Always use prive connection pool for allocation, and call
apr_pool_clear when the connection is closed on recycle, so
that we don't leak on persistent connections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105108 13f79535-47bb-0310-9956-ffa450edef68
2004-09-13 11:13:28 +00:00
Mladen Turk
e35d233809 If any of steps return status != OK close the connection
and call the proxy_http_cleanup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105051 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 16:22:23 +00:00
Justin Erenkrantz
df0ae2afcd Fix a trio of bugs in how mod_proxy relays requests:
- Fix type error in proxy-sendchunks case that caused an invalid T-E header.
- Fix data corruption (seen with mod_ssl/mod_proxy combination) due to not
  properly setting aside the body_buckets.
- Pass along a C-L: 0 if we still have a C-L of 0 after filtering and the
  original request to us had that as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104926 13f79535-47bb-0310-9956-ffa450edef68
2004-09-01 17:21:53 +00:00
Mladen Turk
8f2b824bc8 Use ap_str_tolower for lowercasing the scheme.
That was the original intention (not apr_tolower).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104783 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 08:24:18 +00:00
Jeff Trawick
ac4dcde20a apr_tolower() doesn't process the entire string
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104645 13f79535-47bb-0310-9956-ffa450edef68
2004-08-13 12:15:46 +00:00
William A. Rowe Jr
dcbceac99f Make sure that the things get logged using the same look-and-feal.
Also fix the return code from DECLINED to service unavailable if the connection breaks.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104623 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:09:17 +00:00
William A. Rowe Jr
d65c9af1d8 Always use the cleanup. Do not close the socket directly.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104603 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:45:08 +00:00
William A. Rowe Jr
674cfed554 Fix the assertion bug for reslist caused by returning the
same connection back to the pool twice.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104602 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:44:38 +00:00
William A. Rowe Jr
99259de783 We have a proxy-http using connection pool ;)
Need some thorough testing.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104601 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:43:44 +00:00
André Malo
50a54c9e9b fix a bunch of compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104153 13f79535-47bb-0310-9956-ffa450edef68
2004-07-03 16:23:09 +00:00
Martin Kraemer
7f9a011ae3 *** Patch for EBCDIC-host and HTTP/0.9 responses only ***
In dealing with a HTTP/0.9 response to a proxy request, we have pre-read
data that is not an HTTP header. At this point of processing, we don't
know yet whether the data is going to be interpreted an binary or not.
(In fact, we may never find out because HTTP/0.9 lacks the Content-Type
headers; only by configuring mod_charset_lite can we control the conversion).
But mod_charset_lite will get control only later, so it cannot decide on
the conversion of the current buffer full of data.
=> This is an extreme and rare situation normally.
So, for catching the most obvious problem (talking not to a HTTP server
but to some other protocol), the best guess here is to treat the buffer
as "text/*" (to make error messages readable).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104081 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 14:00:07 +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
Jim Jagielski
ec44c1ec9d *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103639 13f79535-47bb-0310-9956-ffa450edef68
2004-05-10 13:58:56 +00:00
Joe Orton
a636051074 * modules/proxy/proxy_http.c (ap_proxy_http_process_response):
Consistently check whether r->status is "successful" or not; fix
screwy handling of 2xx-but-not-200 responses when ProxyErrorOverride
is used.

PR: 20183
Submitted by: Marcus Janson <marcus.janson@tre.se>, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102935 13f79535-47bb-0310-9956-ffa450edef68
2004-03-11 17:21:47 +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
Martin Kraemer
f0ca54f433 If the proxy was enabled, and UseCanonicalHostname was off,
then the Via: header would report not the proxy
hosts's ServerName (or any of its configured VHosts's names) as it
should, but the *origin hosts*'s name.
Now it reports its ServerName.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102320 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 16:11:55 +00:00
Joe Orton
7f52c2bfe4 * modules/proxy/proxy_http.c (ap_proxy_http_process_response): Handle
all 1xx interim responses the same, one of the two 2616 compliance
issues in PR 19442.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102283 13f79535-47bb-0310-9956-ffa450edef68
2004-01-12 14:08:08 +00:00
Martin Kraemer
3b97e32bf7 Cosmetic change (I dislike 'known-constant-minus-one' literal numbers):
The ap_is_HTTP_INFO() macro checks for values in the 100...199 range,
and is a better readable replacement for the value 199.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102282 13f79535-47bb-0310-9956-ffa450edef68
2004-01-12 13:06:39 +00:00
Bill Stoddard
79fb63443c mod_proxy hangs when both KeepAlive and ProxyErrorOverride are enabled,
and a non-200 response without a body is generated by the backend
server.

Submitted by: Graham Wiseman, Richard Reiner
Reviewed by: Richard Reiner, Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102239 13f79535-47bb-0310-9956-ffa450edef68
2004-01-09 03:04:41 +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
Ian Holsman
5209db57ee mod_proxy with ProxyErrorOverride On in a reverse-proxy configuration attaches
a body to the 302 response and a wrong Content-Length header.


PR: 22951
Submitted by:	Ermanno Scaglione <scaglione ..at.. starnetone.de>
Reviewed by:	Blaise Tarr <blaise.tarr .. at .. cnet.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102069 13f79535-47bb-0310-9956-ffa450edef68
2003-12-15 23:04:40 +00:00
Joe Orton
4de16bd525 Fix format string warnings from gcc on amd64:
* modules/ssl/ssl_scache_dbm.c (ssl_scache_dbm_store):
Print apr_size_t using APR_SIZE_T_FMT.

* modules/ssl/ssl_engine_io.c (ssl_filter_write): Print difference
between sizes using APR_SSIZE_T_FMT, apr_size_t using APR_SIZE_T_FMT.

* modules/proxy/proxy_http.c (ap_proxy_http_request): Print
apr_uint64_t using APR_UINT64_T_HEX_FMT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102037 13f79535-47bb-0310-9956-ffa450edef68
2003-12-12 12:36:50 +00:00
Jeff Trawick
e3c11d6cd1 Fix memory leak in handling of request bodies during reverse
proxy operations.

PR:      24991
Submitted by: Larry Toppi <larry.toppi citrix.com>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102017 13f79535-47bb-0310-9956-ffa450edef68
2003-12-10 19:26:15 +00:00
Joe Orton
41d4a3c58a * proxy_http.c (ap_proxy_http_process_response): Send a valid
status-line even if the parsed status-line had no trailing spaces.
Remove the warning for this case as triggers for valid status-lines
too.

PR: 23998


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101516 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 16:09:58 +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
Victor J. Orlikowski
72b6ff11a2 Silence a compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99385 13f79535-47bb-0310-9956-ffa450edef68
2003-04-16 06:30:15 +00:00
Graham Leggett
35d0dc3b8e Clarify an error message
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99369 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 16:39:12 +00:00
Graham Leggett
3685b4d181 Correct some indenting
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99367 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 16:33:56 +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
Justin Erenkrantz
392fee3abc Rewrite how proxy sends its request to allow input bodies to morph the request
bodies.  Previously, if an input filter changed the request body, the
original C-L would be sent which would be incorrect.

Due to HTTP compliance, we must either send the body T-E: chunked or include
a C-L for the request body.  Connection: Close is not an option.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97812 13f79535-47bb-0310-9956-ffa450edef68
2002-12-09 05:37:26 +00:00
Brian Pane
45741376ff mod_proxy: Don't remove the Content-Length from responses
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97777 13f79535-47bb-0310-9956-ffa450edef68
2002-12-05 03:49:45 +00:00
Brian Pane
05290b1d84 When doing a GET of a proxied URL as a subrequest within
a POSTed request, don't send the original POST's Content-Length
as part of the header for the GET.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97455 13f79535-47bb-0310-9956-ffa450edef68
2002-11-08 09:24:00 +00:00
Bill Stoddard
20ea80fcd9 Fix a segfault when the client closes the connection prematurely.
Reported by: Fabio Wakim Trentini
Reviewed by: Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97305 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 20:58:55 +00:00
Jeff Trawick
b31bec2fe9 add some parens to quiet a gcc warning:
proxy_http.c:866: warning: suggest parentheses around assignment used as truth value


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96983 13f79535-47bb-0310-9956-ffa450edef68
2002-09-26 11:35:47 +00:00
Graham Leggett
75c84ac30d Make sure the contents of the WWW-Authenticate header is
passed on a 4xx error by proxy. Previously all headers
were dropped, resulting in the browser being unable to
authenticate.
PR:
Obtained from:
Submitted by:	Dr Richard Reiner <rreiner@fscinternet.com>, Richard Danielli <rdanielli@fscinternet.com>, Graham Wiseman <gwiseman@fscinternet.com>, David Henderson <dhenderson@fscinternet.com>
Reviewed by:	Graham Leggett


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96982 13f79535-47bb-0310-9956-ffa450edef68
2002-09-26 08:55:28 +00:00
Ian Holsman
6efc028098 Add A warning when servers don't set their status line
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96484 13f79535-47bb-0310-9956-ffa450edef68
2002-08-22 15:02:49 +00:00
Ian Holsman
5676d38cc2 fix the case when a server doesn't send a response string
Submitted by:	Brett Hutley <brett@hutley.net> J.D. Silvester <jsilves@uwo.ca>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96469 13f79535-47bb-0310-9956-ffa450edef68
2002-08-21 16:01:15 +00:00
Graham Leggett
7f74fe4231 Fix proxy so that it is possible to access ftp: URLs via a proxy
chain.
PR:
Obtained from:
Submitted by:	Peter Van Biesen <peter.vanbiesen@vlafo.be>
Reviewed by:	Graham Leggett <minfrin@apache.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96320 13f79535-47bb-0310-9956-ffa450edef68
2002-08-08 17:59:18 +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
Ian Holsman
6deba78a9a Renames Pending:
This clears the list of renames pending in apr-util.
 Parts of this list was alreadu done, but the pending list hadn't been updated.

 apr_hook_debug_current     from apr_current_hooking_module
 apr_hook_debug_show        from apr_show_hook

 apr_hook_global_pool       from apr_global_hook_pool
 apr_hook_sort_all          from apr_sort_hooks

 apr_uri_port_of_scheme     from apr_uri_default_port_for_scheme
 apr_uri_unparse            from apr_uri_unparse_components
 apr_uri_parse              from apr_uri_parse_components
 apr_uri_parse_hostinfo     from apr_uri_parse_hostinfo_components

 apr_uri_t                  from apr_uri_components

 All APR_URI_*              from all APU_URI_* symbols
 All APR_UNP_*              from all UNP_* symbols

PR:
Obtained from:
Submitted by:	 Thom May
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95966 13f79535-47bb-0310-9956-ffa450edef68
2002-07-06 20:04:38 +00:00
Justin Erenkrantz
001b387bcd Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE

This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0.  This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.

This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).

Suggested by:	Greg "this isn't the '80s" Stein
Reviewed by:	Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95891 13f79535-47bb-0310-9956-ffa450edef68
2002-06-26 19:45:07 +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
Ian Holsman
aff9b8aef6 add 2 new enviornment variables to deal with misbehaving backends
"proxy-nokeepalive" which removes the Connection: line completely
"force-proxy-request-1.0" which forces the request to be HTTP/1.0
this allows apache to reverse proxy misbehaving appservers


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95456 13f79535-47bb-0310-9956-ffa450edef68
2002-05-31 21:21:10 +00:00
Justin Erenkrantz
ba424185f0 Switch mod_proxy to using the brigade/filter calls directly rather than
the *_client_block calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95394 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 07:33:59 +00:00
Justin Erenkrantz
5607afff2b Add a PROXYREQ_RESPONSE value for request_rec->proxyreq because it is
possible that there can be different behavior at the protocol level if
request_rec isn't really a request but a response.

This stems from the fact that request bodies must be indicated by
Content-Length or Transfer-Encoding, but response bodies do not.  The
recent change to ap_http_filter to return EOS if there isn't a body broke
proxy.  Therefore, there must be some way for the proxy to indicate that
this is a response.  Accordingly, ap_http_filter can allow the BODY_NONE
iff this is a response.

Since r->proxyreq is set to PROXYREQ_PROXY even for the original request
from the client, that value isn't sufficient.  Hence, the introduction of
PROXYREQ_RESPONSE.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95390 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 07:04:45 +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