Yann Ylavic
3c9ddf44bf
Revert r1715789: will re-commit without spurious functional changes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
Yann Ylavic
29843dc73f
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
...
[Reverted by r1715869]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
Christophe Jaillet
86c204dac3
Concat string at compile time in order to save a few cycles.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1682816 13f79535-47bb-0310-9956-ffa450edef68
2015-06-01 05:12:54 +00:00
Yann Ylavic
76f7cbf485
mod_proxy_wstunnel: Bypass the handler while the connection is not
...
upgraded to WebSocket, so that other modules can possibly take over
the leading HTTP requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674632 13f79535-47bb-0310-9956-ffa450edef68
2015-04-19 15:51:03 +00:00
Yann Ylavic
94610cc166
mod_proxy_wstunnel: Avoid an empty response by failing with 502 (Bad Gateway)
...
when no response is ever received from the backend.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669299 13f79535-47bb-0310-9956-ffa450edef68
2015-03-26 09:07:54 +00:00
Yann Ylavic
549749d283
mod_proxy_{connect,wstunnel}: follow up to r1657636.
...
Since rv is not used as an apr_status_t in the loop (it's logging is done by
proxy_{connect,wstunnel}_transfer() when necessary/relevent), use a boolean
instead to avoid the ugly ORs between APR error codes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669130 13f79535-47bb-0310-9956-ffa450edef68
2015-03-25 15:00:37 +00:00
Yann Ylavic
c6f5f2f63f
mod_proxy_connect/wstunnel: If both client and backend sides get readable
...
at the same time, don't lose errors occuring while forwarding on the first
side when none occurs next on the other side, and abort.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657636 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 17:36:23 +00:00
Christophe Jaillet
a3f6c09230
Synch trunk with 2.4.x.
...
In r1588495, additionnal logging has been added to 2.4.x as part of the merge.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643434 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 21:06:31 +00:00
Yann Ylavic
6d40a34636
mod_proxy_wstunnel: abort backend connection on polling error to avoid
...
further processing (lingering close, SSL shutdown).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635644 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 23:56:27 +00:00
Christophe Jaillet
2785b009e9
Silent some cppcheck warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621806 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 14:40:01 +00:00
Takashi Sato
3d83bde5ef
Revert r1601943, r1602058, r1605307 (socket callback returning pollfds)
...
Revert r1605369 (wstunnel refactoring)
per discassion on dev@httpd.a.o thread Message-ID:
<CALK=YjN9HfThP_k_rF9iJPcUhcQk9sNOaDPxZNG+HcJNWS4ZAQ@mail.gmail.com >
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605946 13f79535-47bb-0310-9956-ffa450edef68
2014-06-27 04:17:30 +00:00
Takashi Sato
83aea4aac7
Async mod_proxy_wstunnel:
...
Resume a client connection from SUSPENDED state to avoid the
connection remain suspended.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605376 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 12:52:09 +00:00
Takashi Sato
ffc5802356
Refactor asynchronous mod_proxy_wstunnel using pollfd returned by MPM.
...
r1601943 and r1605307 made Event MPM return woken pollfd, so async
wstunnel doesn't need its own apr_pollset_poll.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605369 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 12:24:03 +00:00
Christophe Jaillet
0c2094251f
Use ap_remove_input_filter_byhandle instead of duplicating the code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605207 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 21:47:21 +00:00
Takashi Sato
0e4cf76a64
Socket event callback now takes pollfd.
...
User (e.g. mod_proxy_wstunnel) can know
which socket is ready.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601943 13f79535-47bb-0310-9956-ffa450edef68
2014-06-11 16:39:34 +00:00
Takashi Sato
854c7a5611
* apr_status_t vs HTTP status code fix
...
* use APR_STATUS_IS_ENOTIMPL rather than direct comparison
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601604 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 11:21:22 +00:00
Takashi Sato
a310a093ba
Private function doesn't need ap_ prefix.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601603 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 11:08:43 +00:00
Yann Ylavic
f063241b1f
mod_proxy_wstunnel: Fix the use of SSL connections with the "wss:" scheme.
...
PR55320.
Submitted by: Alex Liu <alex.leo.ca gmail.com>
Committed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594625 13f79535-47bb-0310-9956-ffa450edef68
2014-05-14 15:54:38 +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
Eric Covener
2cba644ed3
whitespace changes only
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587657 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:56:32 +00:00
Eric Covener
7fd249108f
followup to r1587036.
...
if backend->close is set too early, proxy_util.c will close it right
away and then blow away the field.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587654 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:56:00 +00:00
Eric Covener
88bcccd4a9
s/asynch/async
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587126 13f79535-47bb-0310-9956-ffa450edef68
2014-04-14 00:13:43 +00:00
Eric Covener
4becd93579
several related mod_proxy_wstunnel changes that are tough to pull apart:
...
* make async websockets tunnel opt-in
* add config for how long we block a thread in asynch mode
* add config for a cap on the synchronous path
* avoid sending error responses down the upgraded tunnel
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587075 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 18:41:05 +00:00
Eric Covener
e255101079
stop leaking websockets backend connections (trunk only)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587057 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:26:30 +00:00
Eric Covener
4a3fe3bcf7
cleanup wstunnel error handling
...
Submitted By: covener, ylavic, Edward Lu
Commited By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587053 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:21:50 +00:00
Eric Covener
a8b534d41d
actually remove mod_reqtimeout, since the util_filter functions involved
...
only manipulate c->input_filters no matter what we pass. We need to make
copies of c->input_filters after, not before, it skips over reqtimeout.
Note: reqtimeout doesn't really interfere today with normal operation,
but this is misleading/confusing when dealing with other
wstunnel issues.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587040 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:00:38 +00:00
Eric Covener
5ab33646af
*) mod_proxy_wstunnel: Don't pool backend websockets connections,
...
because we need to handshake every time. PR 55890.
[Eric Covener]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587036 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 16:57:34 +00:00
Eric Covener
33f7dbafce
handle POLLERR/POLLHUP during poll() to avoid high CPU busy loop.
...
Submitted By: Joffroy Christen <joffroy.christen solvaxis com>, Eric Covener]
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1569615 13f79535-47bb-0310-9956-ffa450edef68
2014-02-19 02:42:29 +00:00
Jim Jagielski
6dd580a163
Add no's
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1530361 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 17:21:27 +00:00
Jim Jagielski
63e7600d84
typo
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524980 13f79535-47bb-0310-9956-ffa450edef68
2013-09-20 12:05:58 +00:00
Guenter Knauf
b8f413778d
Fix for stupid CodeWarrior compiler.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494196 13f79535-47bb-0310-9956-ffa450edef68
2013-06-18 16:51:17 +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
Jim Jagielski
44319eb4c0
Keep mod_req clear. Simply scan thru input filters and
...
remove it within the ws submodule. Nasty, but it keeps
mod_req untouched (for now ;) )
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458447 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 18:27:17 +00:00
Jim Jagielski
8a47ad90f6
bypass reqtimeout for websockets
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1458285 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 13:56:32 +00:00
Jim Jagielski
236519bf3d
streamline
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1454415 13f79535-47bb-0310-9956-ffa450edef68
2013-03-08 14:55:56 +00:00
Jim Jagielski
2cac6515e9
don't strip these, ensure that they exist.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1454414 13f79535-47bb-0310-9956-ffa450edef68
2013-03-08 14:55:53 +00:00
Jim Jagielski
a54621aca4
"final" rename :)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1454386 13f79535-47bb-0310-9956-ffa450edef68
2013-03-08 13:47:04 +00:00