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

14899 Commits

Author SHA1 Message Date
Brian Pane
e0b3cdeeac Use the new APR_POLLSET_NOCOPY option when creating the core pollset.
This eliminates the descriptor copying and mutex operations, and
O(n)-time apr_pollset_remove() loop when used with an apr_pollset
implementation that support the no-copy optimization.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@327757 13f79535-47bb-0310-9956-ffa450edef68
2005-10-23 06:46:00 +00:00
Brian Pane
40e5bd5e08 forward-port MMN from trunk to async-dev branch so MMN-dependent perl-framework tests will compile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@321517 13f79535-47bb-0310-9956-ffa450edef68
2005-10-16 00:15:27 +00:00
Brian Pane
37c6f924a2 more verbose error message on write completion error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@312539 13f79535-47bb-0310-9956-ffa450edef68
2005-10-10 04:23:14 +00:00
Brian Pane
04745bea8e Enabled async write completion in the Event MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@312536 13f79535-47bb-0310-9956-ffa450edef68
2005-10-10 03:49:31 +00:00
Brian Pane
8c5077d5c6 Added a missing return value in ap_core_output_filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@312532 13f79535-47bb-0310-9956-ffa450edef68
2005-10-10 03:18:51 +00:00
Brian Pane
072aeca61f Fixed processing of pipelined requests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@312512 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 22:54:44 +00:00
Brian Pane
42bf8b16c9 Refactored CONN_STATE_WRITE_COMPLETION handling.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307380 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 08:15:40 +00:00
Brian Pane
41f09ddf07 Update new conn_rec field "data_in_output_filters" in core output filter
so async MPMs can tell whether to keep polling and writing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307379 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 07:43:23 +00:00
Brian Pane
bc110b3e7a cleaned up the timeout management in ap_core_output_filter()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307371 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 05:43:08 +00:00
Brian Pane
e7d300d318 Refactored ap_process_request() so that in async MPMs, the MPM (and not
the httpd core) is responsible for write completion.

Note that, with this commit, the Event MPM is still doing write
completion synchronously.  I'll add async write completion as a
separate commit.

Note also that this commit breaks the (experimental) Leader/Followers
MPM on the (equally experimental) async-dev branch.  The fix is to add
either synchronous or asynchronous write completion to that MPM.  Rather
than hack in synchronous write completion, I'll revisit Leader/Followers
once I have async working in Event.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307362 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 04:49:52 +00:00
Brian Pane
6f3e6ceafa Forward-port of revision 307355 to async-dev branch:
Correct an out-of-date comment


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307356 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 03:56:47 +00:00
Brian Pane
161035891f Simplified mod_logio to take advantage of the delayed invocation of
the logger.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307346 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 02:45:20 +00:00
Brian Pane
d946febd16 Added mod_logio hooks to the new, nonblocking version of
ap_core_output_filter()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307344 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 02:32:17 +00:00
Brian Pane
bd34a1bc19 Redesign of request cleanup:
- A new End-Of-Request bucket is pushed through the output filter
    chain after the last bucket of the response.
  - This bucket gets destroyed by ap_core_output_filter() after the
    buckets in front of it have been sent.
  - The destroy callback of the EOR bucket invokes the access logger
    and frees the request's pool.

With this change, the request logger now runs after the last byte of
the response is _sent_, rather than after the last byte of the response
is _generated_.  This should make the bytes-sent count in the access
log more accurate in cases where the client closes the connection
midway through the sending of the response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307339 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 01:37:11 +00:00
Brian Pane
06809b3c3f Forward-port of the latest event MPM code from the 2.3-dev trunk into
the async-dev branch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@307334 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 23:53:51 +00:00
Brian Pane
1000a35949 Forward-port of wrowe's NET_TIME filter removal/refactor into
the async-dev branch, in preparation for developing async write
completion in this branch on top of the new timeout design.
http://svn.apache.org/viewcvs.cgi?rev=306495&view=rev


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@306541 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 06:19:12 +00:00
Brian Pane
846cbeee1c port the fix for PR35292 forward from the 2.3 trunk to the async-dev branch, because one of the perl-framework test cases now checks for this fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@306540 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 06:13:39 +00:00
Brian Pane
64dbc48fe2 forward-port the latest versions of mod_ssl and mod_setenvif from the 2.3 trunk to the async-dev branch so t/TEST will work once again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@306538 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 06:11:43 +00:00
Brian Pane
b821e76412 New version of ap_core_output_filter...
The big change is that it now does nonblocking writes when possible.  The
goal of this redesign is to more cleanly support asynchronous write completion
in MPMs such as Event or Leader.  However, the nonblocking writes may also
help in Worker and Prefork by allowing more overlapping of handler and
output filter processing with network writes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@291377 13f79535-47bb-0310-9956-ffa450edef68
2005-09-25 05:22:04 +00:00
Brian Pane
6fb4c5ab57 doh!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@291375 13f79535-47bb-0310-9956-ffa450edef68
2005-09-25 04:25:53 +00:00
Brian Pane
188f4af37a Ported fix for PR35330 forward from the trunk (This particular patch doesn't
interact with the async R&D, but I'm merging it into the async-dev branch
because there's now a test case specifically for this change in
httpd-test/perl-framework.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@291354 13f79535-47bb-0310-9956-ffa450edef68
2005-09-25 01:35:18 +00:00
Brian Pane
926f1e0ab3 Added asynchronous keep-alive support to the leader MPM...
the new io_multiplexer object is intended to provide a
foundation for async processing of the other connection
states.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@280222 13f79535-47bb-0310-9956-ffa450edef68
2005-09-12 00:35:23 +00:00
Brian Pane
d1ff1de803 Added new connection states CONN_STATE_HANDLER and CONN_STATE_WRITE_COMPLETION.
Also, core_create_conn() now initializes the conn_state within the newly
created connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@280221 13f79535-47bb-0310-9956-ffa450edef68
2005-09-12 00:29:10 +00:00
Paul Querna
9c05049bff *) Create an optional function and MPM Query to replace the core output filter.
*) Put an example of using it into the Event MPM, which just calls the original core output filter.  


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@278652 13f79535-47bb-0310-9956-ffa450edef68
2005-09-05 00:21:25 +00:00
Paul Querna
e0a4fb0b63 Create a new development branch to test ideas on async operation of httpd.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-dev@278647 13f79535-47bb-0310-9956-ffa450edef68
2005-09-05 00:12:21 +00:00
Joe Orton
579ef38a3e Introduce SSLProxyVerify better. Add a warning note on exactly
what verification is done by the proxy in the proxy-to-SSL-server
case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265741 13f79535-47bb-0310-9956-ffa450edef68
2005-09-01 14:49:12 +00:00
Jeff Trawick
aa6fdd0e52 httpd.exe/apachectl -V: display the DYNAMIC_MODULE_LIMIT setting
(1.3 has done that for a while)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265737 13f79535-47bb-0310-9956-ffa450edef68
2005-09-01 14:21:38 +00:00
Joe Orton
407dc73f43 * modules/ssl/ssl_util_ssl.c (SSL_X509_STORE_create): Catch errors
returned by X509_LOOKUP_add_dir or X509_LOOKUP_load_file to detect
malformed or misconfigured CRLs.  Clear error stack beforehand to
ensure reported errors are relevant.

PR: 36438


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265702 13f79535-47bb-0310-9956-ffa450edef68
2005-09-01 11:58:58 +00:00
Joe Orton
38454d45fe * server/listen.c (open_listeners): Avoid shadowing the 'next'
variable at function-scope.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265701 13f79535-47bb-0310-9956-ffa450edef68
2005-09-01 11:55:31 +00:00
Colm MacCarthaigh
cc841a28e5 Initiliase all of the first_*_limit variables to zero, so that we can actually
raise limits beyond their defaults reliably. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265523 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:10:55 +00:00
Colm MacCarthaigh
106fdaa568 Revert one part. I should have tested seperately. This line isn't neccessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265519 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:04:25 +00:00
Colm MacCarthaigh
cef7ca9fe6 Actually allow the admin to set thread_limit higher than the default.
Also, initialise the first_ variables, since they are tested in the
set_ functions.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265518 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:01:13 +00:00
Jim Jagielski
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
Jim Jagielski
c208de0bcf Some simple debugging log entries
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265505 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:19:27 +00:00
Jim Jagielski
1df26ab1bb More getpid format fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265504 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:18:54 +00:00
Jim Jagielski
f2ed4fda66 Consistantly use APR_PID_T_FMT for getpid value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265049 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 14:23:33 +00:00
Jim Jagielski
27da0d6787 Start of getpid()/%d confusion fix...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265047 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 14:18:33 +00:00
Jeff Trawick
5b3a9d83fd mod_log_config: %{hextid}P will log the thread id in hex with APR
versions 1.2.0 or higher.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265033 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 12:34:07 +00:00
Joe Orton
5f64e4f136 * server/main.c (suck_in_APR): Remove weird gzeof reference which
broke all the -Werror builds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264886 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 22:53:37 +00:00
Colm MacCarthaigh
d2379c9193 Make my PR references consistent with everyone elses.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264881 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 22:33:30 +00:00
Justin Erenkrantz
7c8c772196 mod_cgid: Refuse to work on Solaris 10 due to OS bugs.
PR: 34264


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264866 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 21:21:18 +00:00
Joe Orton
a1e9d51be3 Fix CVE CAN-2005-2700:
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Ensure that
renegotiation is performed for a transition from "SSLVerifyClient
optional" to "SSLVerifyClient require".

The boolean "verify_old & SSL_VERIFY_PEER_STRICT" is true if the old
context merely has optional verification configured, since the
definition of SSL_VERIFY_PEER_STRICT is
(SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_PEER).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264800 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 15:57:38 +00:00
Colm MacCarthaigh
19a0d050b0 If uid_t and gid_t are unsigned on a platform (hurd, for example), using -1
may cause a compiler warning. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264788 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 14:28:48 +00:00
Colm MacCarthaigh
c8e6fa78af Fix PR36410; Change how the get_suexec_identity hook is handled by CGID.
Instead of using mod_userdir and mod_suexec specific hacks, we now run the hook
on the httpd side of the handler. 

If this is NULL, we pass on a magic empty_ugid constant, otherwise pass on the
real ugid.

On the cgid side of the equation, we add our own hook, with REALLY_FIRST, and
then order the hooks. This ensures that cgid's doer runs before any other
registered get_suexec_identity doers.

We use cgid's request config to store the ugid. If ugid == empty_ugid, we DON'T
call ap_os_create_privileged_process, because our doer would return the magic
empty_ugid constant. Having the doer return NULL is no good, because then
userdir and mod_suexec's doers would be called. Instead, we call plain old
apr_proc_create(). 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264759 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 11:26:45 +00:00
Joe Orton
4f1d428f25 Fix a grammar mistake; note what happens when the timeout is
reached.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264737 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 08:24:14 +00:00
William A. Rowe Jr
f87b4c1af1 Correct mod_cgid's argv[0] so that the full path can be delved by the
invoked cgi application, to conform to the behavior of mod_cgi.

PR: 34542
Reviewed by: Andre, OtherBill
Submitted by: Pradeep Kumar S <pradeep.smani gmail.com>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264623 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 20:12:43 +00:00
William A. Rowe Jr
010f409bdc Noticed in the development of fips-enabled mod_ssl, when we are
configured to support exactly one protocol, use that explicit server
  and client mechansim to handshake with the client or proxied machine,
  rather than the generic SSLv23_[client|server]_method().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264621 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 19:59:46 +00:00
Colm MacCarthaigh
146fd39a5a Implement graceful stop in the event MPM. Implementation is identical to
the worker MPM implementation. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264105 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 10:20:25 +00:00
Colm MacCarthaigh
36b3643d82 *how* did I mis-spell that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264104 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 09:38:33 +00:00
Colm MacCarthaigh
5a0531c52e Move the "GracefulShutdownTimeout" command definition into mpm_common
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264103 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 09:28:27 +00:00