1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

654 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
Mladen Turk
6ef95d4e37 Kill the pool cleanup when closing non cachable connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123884 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 08:00:26 +00:00
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Mladen Turk
55230b229b Fix closing connection for non-cachable proxies.
Do not close the entire connection, just socket if
opened.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123842 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 16:04:25 +00:00
Mladen Turk
def2248738 Close the connection for generic forward and
reverse proxy workers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123840 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 15:23:51 +00:00
Mladen Turk
6d38243ac0 Simplify connection address and port resolving for non-cachable workers (gereric forward and reverse proxy).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123811 13f79535-47bb-0310-9956-ffa450edef68
2004-12-31 17:25:58 +00:00
Mladen Turk
81f6517752 Do not cache hostname and port for forward and
reverse generic proxy workers. 

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123809 13f79535-47bb-0310-9956-ffa450edef68
2004-12-31 17:01:05 +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
Jim Jagielski
79419db65a simplify the BalancerMember load factor weighting. Instead of
being percentages (and adjusting when the number don't add
up), loadfactors/lbfactors are now normalized values, so
values like:

   worker    a   b   c
   lbfactor  1   1   2

work as expected (ie: a gets 25%, b gets 25% and c gets 50%).
So we could also have the above as:

   worker    a   b   c
   lbfactor 25  25  50

or even

   worker    a   b   c
   lbfactor 15  15  30



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@122551 13f79535-47bb-0310-9956-ffa450edef68
2004-12-16 14:09:30 +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
Jim Jagielski
cad0958648 We are an int.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111712 13f79535-47bb-0310-9956-ffa450edef68
2004-12-13 13:47:29 +00:00
Jim Jagielski
2ce0fb01c5 Seems to me that if we have a worker which is usable, we
should return that. Otherwise we have no worker (worker
is NULL) and we should return that or else the if clause
takes care of setting worker correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111711 13f79535-47bb-0310-9956-ffa450edef68
2004-12-13 13:40:25 +00:00
Mladen Turk
f08674d77b Set the connection addr from connection pool addres
since proxy_ftp does not use the determine_connection
call.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111359 13f79535-47bb-0310-9956-ffa450edef68
2004-12-09 08:07:27 +00:00
Jeff Trawick
803d2b468d mod_proxy: Respect errors reported by pre_connection hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111304 13f79535-47bb-0310-9956-ffa450edef68
2004-12-08 20:19:04 +00:00
Jeff Trawick
7eb243ba75 wrong format string was converted to APR_PID_T_FMT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109506 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 16:37:41 +00:00
Mladen Turk
4dda290fd1 Add generic reverse proxy worker so that module-driven reverse proxying works. It is enabled by default, but IMO it should be configurable like any other worker so we can limit the number of outgoing connections.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109316 13f79535-47bb-0310-9956-ffa450edef68
2004-12-01 08:44:11 +00:00
Mladen Turk
4821674833 Build proxy_ajp too when --enable-proxy is declared.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109214 13f79535-47bb-0310-9956-ffa450edef68
2004-11-30 17:38:58 +00:00
Bradley Nicholes
804ff9ab22 Allow APR to exist and build outside of the httpd/srclib file structure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106975 13f79535-47bb-0310-9956-ffa450edef68
2004-11-30 00:12:39 +00:00
Mladen Turk
08dfbe5e49 Use APR_PID_T_FMT instead %d for pid logging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106903 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 10:54:46 +00:00
Mladen Turk
25e6a4a500 Make sure that worker initialization is done only
once per worker, as well the initialization of shared
memory slot. Also log the child pid so that logging
makes sense.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106902 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 10:43:28 +00:00
Joe Orton
c36ecfa64f Remove the .cvsignore files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105796 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 09:07:29 +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
Joe Orton
93b4fefbc2 * modules/proxy/proxy_ftp.c (proxy_ftp_canon, proxy_ftp_handler,
proxy_send_dir_filter): Drop ap_ prefix, make static, remove
forward-declarations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105750 13f79535-47bb-0310-9956-ffa450edef68
2004-11-11 12:45:09 +00:00
Joe Orton
9f868521af * modules/proxy/proxy_connect.c (proxy_connect_handler,
proxy_connect_canon): Drop ap_ prefix, make static, remove
forward-declarations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105749 13f79535-47bb-0310-9956-ffa450edef68
2004-11-11 11:37:25 +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
d19ff8597f Do not use reslist if it wasn't created. This fixes cases on prefork with
threads enabled and hmax set.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105480 13f79535-47bb-0310-9956-ffa450edef68
2004-10-16 06:52:35 +00:00
Mladen Turk
f648ac6494 Merge the proxy_status too. Thanks to Christian von Rouques for the patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105457 13f79535-47bb-0310-9956-ffa450edef68
2004-10-14 16:00:41 +00:00
Mladen Turk
67841c5715 Use plain apr/apr-util for ajp.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105353 13f79535-47bb-0310-9956-ffa450edef68
2004-09-30 15:35:45 +00:00
Mladen Turk
f3c232041a The name of the module is mod_proxy not mpm_proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105348 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:14:15 +00:00
Mladen Turk
5a27b0519e No need to call the ap_proxy_initialize_worker when initializing
balancer members, but make sure that balancer module is initialized
after proxy module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105347 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:09:55 +00:00
Mladen Turk
084ca3d9eb Use apr_strftime instead our own format_byte_out function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105346 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:07:47 +00:00
Mladen Turk
1994180dc0 Add server_rec to initialize_worker_share so that it get's
correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105345 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:05:44 +00:00
Mladen Turk
0d9c89ae6f Reformat code to no tab and no CR-LF
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105320 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 16:54:29 +00:00