optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
such as per-directory mod_rewrite substitutions. This would be left floating
around in the request_rec with a pcalloc'ed value, so the core fixup
hook thought some module had overridden it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1043023 13f79535-47bb-0310-9956-ffa450edef68
subrequest, preserve any filters in the output filter chain which
were not specific to the subrequest across the redirect (where
f->r does not point to the subreq's request_rec).
PR: 17629
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@952828 13f79535-47bb-0310-9956-ffa450edef68
same exposure as subrequests, and this change would have doubled
the headers. Revert this bit of the headers_in 'consistification'
Noted by rpluem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901589 13f79535-47bb-0310-9956-ffa450edef68
treatment of headers_out, resolving PR 48359 by keeping subrequest
scope changes out of the main request headers. This ensures that all
requests-without-bodies behave as the requests-with-bodies code has.
Mitre: CVE-2010-0434
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901578 13f79535-47bb-0310-9956-ffa450edef68
prob was that we at this point could still have some
stale and incorrect refs when we adjusted the f-stack.
So move the update earlier so when we adjust, we're
affecting r. Rdiger and Jim pretty much
simultaneously :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725077 13f79535-47bb-0310-9956-ffa450edef68
internal fast redirect and if the new redirected request is NO subrequest.
This fixes at least one of the possible subtle issues mentioned in the
comment to r620133.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724515 13f79535-47bb-0310-9956-ffa450edef68
Using this basic framework, you can return SUSPENDED from an HTTP Handler,
and then register a callback that is invoked by the MPM at a later time.
This initial version only supports _timers_ as callbacks, but in the future I
would like to add things like wait for socket activity, on a socket specified by
the handler.
Once in a callback, It is then the responsibility of the callback fucntion
to finish the HTTP Request handling, but this alows you to do cool things like
a fully async proxy, COMET support, or even rate limiting.
To prove I'm not insane, I've inlcuded an example module, mod_dialup.
You can configure it like this:
<Location "/docs">
ModemStandard "V.32"
</Location>
And for static files inside that path, you will be rate limited to V.32 speeds,
aka 9.6 kilobits/second.
Does anyone besides Rüdiger read commit emails :-) ?
I know there are likely huge problems with this, but I would like to see how far
we can push the Event MPM, figure out what to do better, if there is anything,
and then really dive into the 3.0 development before ApacheCon.
* server/mpm/experimental/event/fdqueue.h:
(timer_event_t): New structure to hold timer events and callback functions.
* server/mpm/experimental/event/fdqueue.c
(ap_queue_empty): Modify to also look at Timer Ring.
(ap_queue_init): Initialize Timer Ring.
(ap_queue_push_timer): New function, pushes a timer event into the queue.
(ap_queue_pop_something): Renamed function, returns a timer event or
a socket/pool for a worker thread to run.
* server/mpm/experimental/event/event.c
(process_socket): If the connection is in SUSPENDED state, don't force it
into linger mode yet, the callback will have to take care of that.
(push_timer2worker): New shortcut function, pushes timer event into queue
for a worker to run.
(timer_free_ring): New global data structure to recycle memory used by
timer events.
(timer_ring): New global data structure to hold active timer events.
(g_timer_ring_mtx): Thread mutex to protect timer event data structures.
(ap_mpm_register_timed_callback): New Function, registers a callback to be
invoked by the MPM at a later time.
(listener_thread): Calculate our wakeup time based on the upcoming Event
Queue, and after pollset_poll runs, push any Timers that have passed
onto worker threads to run.
(worker_thread): Call new queue pop method, and if the Timer Event is
non-null, invoke the callback. Once the callback is done, push the
structure onto the timer_free_ring, to be recycled.
(child_main): Initialize new mutex and ring structures.
* server/config.c
(ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.
* modules/http/http_core.c
(ap_process_http_async_connection): Don't close the connection when in
SUSPENDED state.
* modules/http/http_request.c
(ap_process_request_after_handler): New function, body pulled from the old,
ap_process_async_request. Split to let handlers invoke this so they
don't need to know all of the details of finishing a request.
(ap_process_async_request): If the handler returns SUSPENDED, don't do
anything but return.
* include/ap_mmn.h: Bump MMN.
* include/ap_mpm.h
(ap_mpm_register_timed_callback): New function.
* include/httpd.h:
(SUSPENDED): New return code for handlers.
(request_rec::invoke_mtx): New mutex to protect callback invokcations
from being run before the original handler finishes running.
(conn_state_e): Add a suspended state.
* include/http_request.h
(ap_process_request_after_handler): New function to make it easier for
handlers to finish the HTTP Request.
* modules/test/config.m4: Add mod_dialup to build.
* modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM
to work.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697357 13f79535-47bb-0310-9956-ffa450edef68
brigade in the case that a non blocking read from the socket returned
APR_EAGAIN. So getting an empty brigade also shows that no data is present
in the input filter.
While this reduces the number of false positives for "real data" in the input
filter the behaviour is not as good as before 533820 because if there are
only CRLF's in the input filter we do not flush, but we should. To fix this
it seems that a simulation of AP_MODE_EATCRLF is needed inside of
check_pipeline.
- Destroy brigade bb at the end of the function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@535879 13f79535-47bb-0310-9956-ffa450edef68
to accomodate mod_ssl's input filter. AP_MODE_EATCRLF is essentially a no-op
in that filter.
this fixes missing imbedded graphics etc when using the Event MPM with mod_ssl
with HTTP pipelining enabled in the browser. the pipelined requests after the
first were never read from mod_ssl's input filter. it might reduce unneeded
flushes with other MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@533820 13f79535-47bb-0310-9956-ffa450edef68
pool, rather than the request pool, because the core output filter
may need to reference the brigade immediately after deleting the
EOR bucket (and thus the request pool). This fixes a coredump
encountered when running t/TEST on an httpd compiled with
"--enable-pool-debug."
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329484 13f79535-47bb-0310-9956-ffa450edef68
Designed to minimize Apache's KeepAlive overhead.
This MPM depends on the current APR-trunk for new features added to
the apr_pollset interface. Currently the underlying operating
system must support KQueue or EPoll.
Status:
Should work as a drop in replacement for all non-ssl servers.
SSL Requests that use HTTP 1.1 Pipelining do not currently work.
Testing:
I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3.
Originally based on the patch by Greg Ames.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105919 13f79535-47bb-0310-9956-ffa450edef68