modules

Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
This not a hot path in RL use case, but looks to be one during testing with the test framework.

Sso save a few cycles in this (unusual) use case.

Merge 2 loops in order to save a few cycles.
Simplify and speed-up ssl_io_data_dump().

Instead of using a temp buffer for each byte or char written, and calling

strlen over and over again to find the place where to copy this buffer,

write directly at the correct place in the final buffer, and take advantage

of 'apr_snprintf' returning the number of bytes copied.

This looks like a hot path when running the test framework (because of TRACE7), so it could be slighly useful in this use case :)

don't try to load modules from a NULL path

ap_server_root_relative() can fail if apr_filepath_merge fails,

which can happen with a "bad" drive/volume or who knows what

else on Windows. Regardless, if !fullname we are already

going to retry wih what was actually passed.

*) mod_http2: remote support for abandoned http-wg draft

<https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/>.

  1. … 1 more file in changeset.
Follow up to r1880205, APLOGNO().
  1. … 1 more file in changeset.
mod_proxy_uwsgi: Error out on HTTP header larger than 16K

The uwsgi protocol does not let us serialize more than 16K of HTTP header,

so fail early with 500 if it happens.

  1. … 1 more file in changeset.
mod_proxy_http: follow up to r1879419.

Better ap_proxy_tunnel_run() error handling.

mod_proxy: follow up to r1879401: call filters on tunnel POLLERR.

proxy_util.c:

Set POLLERR in reqevents for pollset providers that require it to detect

socket errors (like select() based one).

Call filters to read/write on POLLERR socket event, so that they know about

the error by experiencing the failure. If no POLLIN|POLLOUT is returned

with POLLERR (depending on the system or pollset provider), go with the

requested read or write event handling.

Restore ap_proxy_transfer_between_connections() so that it always tries to

read first (i.e. move yielding conditions afterward).

Add proxy_tunnel_forward() helper that calls transfer_between_connections()

and handles errors pollset updates.

Call proxy_tunnel_forward() when write completion finishes and there are

pending input data.

mod_proxy.h:

Add read_buf_size to proxy_tunnel_rec (trunk only, no MMN minor bump).

mod_dav: Some DAV extensions, like CalDAV, specify both document

elements and property elements that need to be taken into account

when generating a property. The document element and property element

are made available in the dav_liveprop_elem structure under the

DAV_PROP_ELEMENT key in the resource pool.

  1. … 2 more files in changeset.
mod_dav: Add utility functions dav_validate_root_ns(),

dav_find_child_ns(), dav_find_next_ns(), dav_find_attr_ns() and

dav_find_attr() so that other modules get to play too.

  1. … 2 more files in changeset.
Avoid NULL pointer dereferences for empty environment variable values
  1. … 1 more file in changeset.
* modules/generators/mod_cgid.c (get_cgi_pid): Fix test for pid=0.

(cgid_handler): Remove duplicated test for pid=0 here added in

r1879119.

*) mod_http2:

Fixes <https://github.com/icing/mod_h2/issues/200>:

"LimitRequestFields 0" now disables the limit, as documented.

Fixes <https://github.com/icing/mod_h2/issues/201>:

Do not count repeated headers with same name against the field

count limit. The are merged internally, as if sent in a single HTTP/1 line.

  1. … 1 more file in changeset.
* Update logno
  1. … 1 more file in changeset.
* Make get_line more robust in the case that it is called multiple times:

- Safe the brigade between mutiple calls to correctly handle transient

buckets.

- Detect possible endless loops.

  1. … 1 more file in changeset.
* Do not try to parse already aborted requests

Submitted by: icing

Extend method_precondition hook to be called during the PROPFIND

and LABEL walkers, once for each walked resource.

  1. … 1 more file in changeset.
mod_dav: Allow other DAV modules to use dav_get_resource().

  1. … 2 more files in changeset.
Follow up to r1879449: yet better MPM poll callback API.

Let pass a const pfds to the MPM, for it to make a copy on the given pool

as needed.

  1. … 5 more files in changeset.
mpm_common: add pool argument to mpm_register_poll_callback[_timeout] hooks.

This is cleaner API than using pfds->pool implicitely.

MAJOR bump but reusing the existing hooks (with an API/ABI breakage) because

it's trunk material only.

  1. … 5 more files in changeset.
* modules/ssl/ssl_scache.c (ssl_scache_init): Use <16 character

cname argument for socache ->init() per the API constraint.

mod_proxy_wstunnel: follow up to r1879418: handle first async lifetime too.

Create the dedicated pfds and subpool in proxy_wstunnel_request() too, for

the first call to ap_mpm_register_poll_callback_timeout().

While at it, add comments about why we need the dedicated pfds/subpool.

mod_proxy_http: follow up to r1879419: clarify poll callback pds/subpool.

Comments about why we need a dedicated pfds and its subpool for

ap_mpm_register_poll_callback_timeout().

mod_proxy_http: handle async tunneling of Upgrade(d) protocols.

When supported by the MPM (i.e. "event"), provide async callbacks and let

them be scheduled by ap_mpm_register_poll_callback_timeout(), while the

handler returns SUSPENDED.

The new ProxyAsyncDelay directive (if positive) enables async handling,

while ProxyAsyncIdleTimeout determines the timeout applied on both ends

while tunneling.

Github: closes #126

mod_proxy_wstunnel: avoid leaks on tunnel->pfds->pool.

Since event_register_poll_callback_ex() allocates its data on pfds->pool,

we need a subpool to be cleared at each proxy_wstunnel_callback() call.

mod_ssl: release coalesced data when called from ap_filter_output_pending().

The purpose of ap_filter_output_pending() is to flush pending data, so

ssl_io_filter_coalesce() should honor that.

This allows mod_proxy to not care about mod_ssl coalescing filters when

tunneling between connections.

mod_proxy: reindent ap_proxy_transfer_between_connections() after r1879401.

No functional change.

mod_proxy: improved and reentrant tunneling loop.

modules/proxy/mod_proxy.h:

Rename AP_PROXY_TRANSFER_SHOULD_YIELD to AP_PROXY_TRANSFER_YIELD_PENDING

and add AP_PROXY_TRANSFER_YIELD_MAX_READS.

modules/proxy/mod_proxy_http.c:

modules/proxy/mod_proxy_wstunnel.c:

Removing of reqtimeout filter is now handled by ap_proxy_tunnel_create().

modules/proxy/proxy_util.c:

ap_proxy_transfer_between_connections():

Reorganize loop to break out early.

When AP_PROXY_TRANSFER_YIELD_PENDING, if !ap_filter_should_yield() we

still need to run and check ap_filter_output_pending() since it may

release pending data.

When AP_PROXY_TRANSFER_YIELD_MAX_READS, stop the loop after too much

reads (PROXY_TRANSFER_MAX_READS = 10000) to release the thread and

give the caller a chance to schedule the other direction.

Don't return APR_INCOMPLETE when it comes from an incomplete body

detected by ap_http_filter().

ap_proxy_tunnel_create():

Start with POLLOUT on both directions so that any pending output data

is flushed first.

ap_proxy_tunnel_run():

Remove re-init/clear of the pollset for each call so that the function

is reentrant.

Handle POLLOUT before POLLIN so that we can read in the same pass once

all buffered output data are flushed, using ap_filter_input_pending()

to drain buffered input data.

This is preparatory patch for async websocket tunneling is mod_proxy_http.

Revert r1879361: 2.4.x material only.