1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-25 10:59:28 +03:00
Commit Graph

222 Commits

Author SHA1 Message Date
Jeff Trawick
7a8893fe32 spool_reqbody_cl(): mention in commentary that any data we
read into memory before reaching our threshold will not be
written to disk

tweak an existing comment, since "also" does not apply to
the situation where we chunk due to an environment variable
setting


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@151147 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 12:03:54 +00:00
Jeff Trawick
f611a09378 pretty up some error log messages; include useful info
such as directory name and file name


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@125089 13f79535-47bb-0310-9956-ffa450edef68
2005-01-13 19:01:19 +00:00
Jeff Trawick
761dee95bd in memory of Greg's Grandma, fix another ungrammatical comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@125000 13f79535-47bb-0310-9956-ffa450edef68
2005-01-12 23:21:50 +00:00
Greg Ames
d5bb484117 simplify
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124999 13f79535-47bb-0310-9956-ffa450edef68
2005-01-12 22:28:27 +00:00
Greg Ames
3964c8fac0 grammatical nit-pick
(can't help it...Grandma was an English teacher)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124994 13f79535-47bb-0310-9956-ffa450edef68
2005-01-12 21:46:35 +00:00
Jeff Trawick
853ffd21c6 don't flush more than is necessary; this change keeps us
from writing small packets to the origin server when we're
streaming the request body


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124807 13f79535-47bb-0310-9956-ffa450edef68
2005-01-10 16:15:34 +00:00
Jeff Trawick
fe5fe7fa54 stick with the same bucket alloc (r->connection)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124805 13f79535-47bb-0310-9956-ffa450edef68
2005-01-10 15:27:14 +00:00
Jeff Trawick
8c19c6c82e create tmp files with names more like those of htpasswd and
htdigest


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124796 13f79535-47bb-0310-9956-ffa450edef68
2005-01-10 12:33:54 +00:00
Jeff Trawick
c4882b844e watch out for "Content-Length: 0" more carefully; it has
to be handled a certain way


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124562 13f79535-47bb-0310-9956-ffa450edef68
2005-01-07 19:37:33 +00:00
Jeff Trawick
15da839a22 if last brigade of data received from client had data
and EOS, then input_brigade would be empty here


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124377 13f79535-47bb-0310-9956-ffa450edef68
2005-01-06 14:16:54 +00:00
Jeff Trawick
a65178039f support extremely large request bodies by representing the
spool file with multiple file buckets, as with default handler


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124230 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 17:29:52 +00:00
Jeff Trawick
7fa15d74f1 the check for EOS isn't going to work if we already
deleted the eos; we ended up sending the last piece
of data from the client twice; I had (poorly) modified
the EOS section from the normal idiom to keep from having
to deal with the EOS later when reusing the input
brigade


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124220 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 15:25:12 +00:00
Jeff Trawick
168ee6cbfb clean up the data that we just wrote to the spool file;
otherwise, very very nasty stuff happens when input brigade
with same contents is passed down to filters to grab more
body data


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124204 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 14:11:49 +00:00
Jeff Trawick
07c50805fb Fix a problem in the path which preserves the input content
length; the header brigade would get lost

Submitted by: Allan Edwards


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124202 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 14:08:00 +00:00
Jeff Trawick
94d4653558 overhaul of HTTP proxy handling of request bodies to resolve
unlimited memory consumption issue with current 2.1.x
solution


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124201 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 14:00:57 +00:00
Jeff Trawick
d2c60589c6 mod_proxy: Fix a request corruption problem and a buffering problem
which sometimes prevented proxy-sendchunks from working.

strlen() couldn't be used since no space had been allocated
for trailing NUL, so occasionally the T-E header field contained
garbage and a 400 error would be returned by the origin server.

The lack of a flush bucket after the final "0\r\n\r\n" was a
showstopper for my simple tests (reverse proxy to Apache 1.3 +
custom module which read the body).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123727 13f79535-47bb-0310-9956-ffa450edef68
2004-12-30 16:31:13 +00:00
Cliff Woolley
a89bce3fd9 "transfered" is not a word.
s/transfered/transferred/g;



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111858 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 18:58:25 +00:00
Jim Jagielski
0fb2f37f3e grammatical parameter change... "readed" -> "read"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111830 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 16:08:55 +00:00
Mladen Turk
939710c063 Make proxy address cache thread safe and available only
to pooled workers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111827 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 15:45:19 +00:00
Joe Orton
3b18e3e673 * modules/proxy/proxy_http.c (ap_proxy_http_process_response): Don't treat
the 205 status-code like 204 or 304, per recent http-wg discussion:
http://lists.w3.org/Archives/Public/ietf-http-wg/2004JulSep/0083.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105752 13f79535-47bb-0310-9956-ffa450edef68
2004-11-11 20:06:20 +00:00
Joe Orton
356378fbc9 * modules/proxy/proxy_http.c (ap_proxy_http_process_response): Use the
standard non-blocking-read/flush/blocking-read logic to ensure that
buffered content is flushed to the client if the next read will block.

PR: 19954


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105751 13f79535-47bb-0310-9956-ffa450edef68
2004-11-11 19:49:56 +00:00
Mladen Turk
aa194d57d3 Remove double calculation of tranfered bytes to backend.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105645 13f79535-47bb-0310-9956-ffa450edef68
2004-10-31 16:21:19 +00:00
Mladen Turk
0fc9189541 Count the bytes trasfered and readed so we can display the actual
data traffic, and add additional balancer mechanism that will use the
data traffic into account.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105294 13f79535-47bb-0310-9956-ffa450edef68
2004-09-26 06:56:24 +00:00
Joe Orton
3a008cdd61 * modules/proxy/proxy_http.c (proxy_http_handler, proxy_http_canon):
Drop ap_ prefix, declarations and make static.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105120 13f79535-47bb-0310-9956-ffa450edef68
2004-09-14 18:54:32 +00:00
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