1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

1761 Commits

Author SHA1 Message Date
Mike Rumph
ebd3ed2bf8 Fix some comment typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594301 13f79535-47bb-0310-9956-ffa450edef68
2014-05-13 17:50:39 +00:00
Eric Covener
fba67798ed PR56333: Add an API to resume a connection that a handler has previously suspended.
Submitted by: Artem <artemciy gmail.com>, Edward Lu <Chaosed0 gmail.com>
Committed by: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593860 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:52:32 +00:00
Eric Covener
d758951456 Extend the socket callbacks in event to allow a timeout on the I/O callback.
When a socket callback has a timeout, an associated timer event is used to 
remove the sockets from the pollset and call a timeout function.

* This includes a noteworthy change to the main event loop. Previously,
we would call epoll, then process the timer events, then iterate through the
poll results. After this patch, the timer events are processed before the poll()
a _non-queued_ action can change the pollset conents (a users timed callback
function conversely could easily sit in a queue while the main thread continues
down into epoll)

* timer events can now have sockets associated with them, those sockets are 
removed from the pollset when the timer event fires w/o a queue to the worker.

* timer events now have a canceled flag that can be toggled without locking
the timer list. 

* Drop the severity of some wstunnel messages from DEBUG to TRACE1

* Lift the restriction on using asynchronous websockets connections but having
an idle timeout



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593857 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:41:45 +00:00
Christophe Jaillet
053a9e569a Better self document code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588852 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:51:36 +00:00
Eric Covener
360c8f35f5 r1494157 from eventopt for event, per sf's review comments.
use a subpool of pchild since skiplist allocations will
happen across threads and are only protected from
other skiplist operations.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588806 13f79535-47bb-0310-9956-ffa450edef68
2014-04-20 17:53:38 +00:00
Jeff Trawick
5b4178100c follow-up to r1546759: remove an inadvertently committed testcase
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546760 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 18:00:59 +00:00
Jeff Trawick
540be85c46 Add suspend_connection and resume_connection hooks to notify modules
when the thread/connection relationship changes.  (Currently implemented
only for the Event MPM; should be implemented for all async MPMs.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546759 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 17:56:25 +00:00
Jeff Trawick
2571d1f90c fix whitespace in a debug message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546730 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 14:06:55 +00:00
Jeff Trawick
88e5f7cc40 Follow-up to r1538490:
Ensure that conn_rec->sbh is always cleared when returning from process_socket().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545736 13f79535-47bb-0310-9956-ffa450edef68
2013-11-26 17:11:51 +00:00
Jim Jagielski
18070dd81a Consistent types (2nd commit for future backport ease)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545412 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:24:20 +00:00
Jim Jagielski
a6b32ed9a4 Consistent types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545411 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:24:18 +00:00
Jim Jagielski
d21042e2a8 naming suggestion re: trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545408 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:10:05 +00:00
Jim Jagielski
43625092ad Use offset which is smack dab in the middle.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545364 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 18:28:53 +00:00
Jim Jagielski
cc4921ed2f Use correct type...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545325 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 15:40:16 +00:00
Jim Jagielski
6eb75cff89 r1545286 for eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545292 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 14:08:17 +00:00
Jim Jagielski
7e75c89341 Use a normalized offset point for idlers... still need to worry
that atomics work as "expected", in this case that a add32 of a -1
is the "same" as dec32 (as far as effect on idlers)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545286 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 13:59:06 +00:00
Jim Jagielski
320f4d382e revert 1544876
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545130 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 01:32:53 +00:00
Jim Jagielski
ab81fdf796 Just critically warn people... but keep pushing through.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544876 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 20:29:55 +00:00
Jeff Trawick
30f8aa6460 more apr_file_write_full() simplification (like r1542413)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 22:03:16 +00:00
Eric Covener
b6e7d2dbf0 c->sbh can be unexpectedly NULL when the thread that pulls the ready keepalive
connection out of the queue laps the thread that put it on the queue.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1538490 13f79535-47bb-0310-9956-ffa450edef68
2013-11-04 01:37:31 +00:00
Jeff Trawick
504d337c47 axe unused autodata+heap (clang scan-build)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534888 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 01:23:18 +00:00
Jeff Trawick
2bd622626f Disable event/eventopt if apr skiplist isn't available
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529442 13f79535-47bb-0310-9956-ffa450edef68
2013-10-05 12:44:36 +00:00
Jim Jagielski
898365fd1d skiplist is now in apr 1.5 and above
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528437 13f79535-47bb-0310-9956-ffa450edef68
2013-10-02 12:12:36 +00:00
Jeff Trawick
df246e149e Follow up to r1526666:
Use SYNCHRONIZE instead of PROCESS_ALL_ACCESS because

a. it is sufficient
b. it avoids an issue where PROCESS_ALL_ACCESS is larger on
   newer SDKs, resulting in a run-time error when running on
   older Windows

Close the handle.

Submitted by: Ivan Zhakov <ivan visualsvn.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527220 13f79535-47bb-0310-9956-ffa450edef68
2013-09-28 19:14:25 +00:00
Jeff Trawick
90289779b6 WinNT MPM: Exit the child if the parent process crashes or is terminated.
Submitted by: Oracle, via trawick

The original modification was made some years ago for Oracle HTTP Server
by an Oracle employee.  trawick made additional changes for style and
for trunk/2.4.x changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526666 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 20:08:33 +00:00
Jeff Trawick
d7a099b80c worker MPM: Don't forcibly kill worker threads if the child process is
exiting gracefully.

Submitted by: Oracle, via trawick

This modification was made some years ago for Oracle HTTP Server
by an Oracle employee.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526220 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 16:23:28 +00:00
Eric Covener
a9297bf0b8 In 2.4, the MPM leaves a copy of the non-disconnected FD sitting in
context->accept_socket. This FD will be closed a second time, often
shortly after a worker picks it up in this same FD being reused.  The
first recv fails with WSAENOTSOCK since the same FD was closed in the
listener thread while the worker was pulling it off the queue

(The second close is of the underlying FD/socket, not a shared
apr_socket_t, so it's not short-circuited)

This patch makes it a bit more 2.2.x-ish and solves my problem -- the
context->accept_socket gets zapped at the bottom of the loop if
!disconnected.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523387 13f79535-47bb-0310-9956-ffa450edef68
2013-09-15 02:25:32 +00:00
Eric Covener
5fb59d21c2 style consistency in winnt's worker_main
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520760 13f79535-47bb-0310-9956-ffa450edef68
2013-09-07 12:44:09 +00:00
Jeff Trawick
dedba685f4 Mistakenly try to use a line comment to the end of your Listen
directive on Windows => crash-o-matic

Or,

WinNT MPM: Don't crash during child process initialization if the
Listen protocol is unrecognized. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520368 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 16:33:11 +00:00
Eric Covener
87769b67b4 In event's process_lingering_close, close the socket and remove it
from the ring as soon as we see any status that isn't 
APR_EAGAIN or APR_SUCCESS, instead of waiting specifically
for EOF. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1517365 13f79535-47bb-0310-9956-ffa450edef68
2013-08-25 18:59:42 +00:00
Rainer Jung
67e9e54493 Fix "unused variable" warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494531 13f79535-47bb-0310-9956-ffa450edef68
2013-06-19 10:16:03 +00:00
Jim Jagielski
a3aff5b836 subpool
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494157 13f79535-47bb-0310-9956-ffa450edef68
2013-06-18 14:31:36 +00:00
Jim Jagielski
f632ed1df1 Fold in Eric Covener's socket callback
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493741 13f79535-47bb-0310-9956-ffa450edef68
2013-06-17 12:43:52 +00:00
Stefan Fritsch
ca2948ea2d update log tags
replace duplicate, add missing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481396 13f79535-47bb-0310-9956-ffa450edef68
2013-05-11 19:45:09 +00:00
Graham Leggett
0aacd9b39d simple MPM: Lift the restriction that prevents mod_ssl taking
full advantage of the event MPM. Enable the ability for a module
to reverse the sense of a poll event from a read to a write or vice
versa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470683 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:50:25 +00:00
Graham Leggett
a47569f7c1 core, mod_ssl: Lift the restriction that prevents mod_ssl taking
full advantage of the event MPM. Enable the ability for a module
to reverse the sense of a poll event from a read to a write or vice
versa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470679 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:48:25 +00:00
Stefan Fritsch
3742c77564 Remove some useless declarations that were shadowing other local
variables of the same name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463046 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 20:16:07 +00:00
Eric Covener
1ea14dadff rv uninitialized -- the failing checks don't set rv, so don't pass it to ap_log_error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452072 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 17:38:14 +00:00
Jim Jagielski
b14d59149b As long as we have skiplist, use it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451706 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 20:15:23 +00:00
Jim Jagielski
9c4a88068a And now make aware... compile/build again :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451620 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:36:00 +00:00
Jim Jagielski
a06c6b096e Move skiplist to core
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451618 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:29:30 +00:00
Jim Jagielski
78f315375a sync
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451617 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:25 +00:00
Jim Jagielski
18ad4754d8 1st phase of moving into httpd "core"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451616 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:05 +00:00
Jim Jagielski
de1f4ca41b streamline TZ check
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451615 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:02 +00:00
Jim Jagielski
fdee075e67 sync w/ current event bug-fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451614 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:23:58 +00:00
Jim Jagielski
0e9846c693 resync w/ some event fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1448148 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 13:11:29 +00:00
Jim Jagielski
8fee5391ff typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447872 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 19:08:53 +00:00
Jim Jagielski
72f579f5fc ensure positive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447871 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 19:08:24 +00:00
Christophe Jaillet
08b6d16ffc Log a warning if ThreadStackSize has an inappropriate value.
PR : 54311
Submitted by: Tianyin Xu <tixu cs ucsd edu>

Only event.c has been compiled on my system. The 2 others are just cut and paste.
I have left the same value for APLOGNO in event and eventopt has for the other logged messages. I don't know if it is the right way to do.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433682 13f79535-47bb-0310-9956-ffa450edef68
2013-01-15 21:53:07 +00:00
Stefan Fritsch
7e374279b5 Check that AsyncRequestWorkerFactor is not negative
PR :54254
Submitted by: Jackie Zhang <jackie qq zhang gmail com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425777 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 21:50:06 +00:00