summaryrefslogtreecommitdiffstats
path: root/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bundle in r1904518Eric Covener2023-01-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906495 13f79535-47bb-0310-9956-ffa450edef68
* bump againJim Jagielski2022-12-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905669 13f79535-47bb-0310-9956-ffa450edef68
* Bump mmnJim Jagielski2022-11-301-9/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905646 13f79535-47bb-0310-9956-ffa450edef68
* core: Apply ap_max_mem_free to created threads' pool allocator.Yann Ylavic2022-07-151-30/+26
| | | | | | | | | | | | | | | | | | Since APR does not set the threshold above which the allocator of the thread's starts returning its memory to the system, so set ap_max_mem_free from ap_thread_create(), ap_thread_main_create() and ap_thread_current_create(). * include/httpd.h: Provide our own ap_thread_create() in any case (but !APR_HAS_THREADS). Simplify #ifdef-ery. * server/util.c(thread_start, ap_thread_main_create, ap_thread_current_create): Set ap_max_mem_free to the thread's pool allocator. Simplify #ifdef-ery. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902728 13f79535-47bb-0310-9956-ffa450edef68
* handle large writes in ap_rputsEric Covener2022-06-011-1/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901500 13f79535-47bb-0310-9956-ffa450edef68
* Fix some typoChristophe Jaillet2022-05-081-2/+2
| | | | | | [skip ci] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900691 13f79535-47bb-0310-9956-ffa450edef68
* *) core: add ap_sb_get_child_thread() to retrieve child_numStefan Eissing2022-04-192-1/+4
| | | | | | | | and thread_num from a scoreboard handle. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900029 13f79535-47bb-0310-9956-ffa450edef68
* Merge PR 311:Stefan Eissing2022-04-133-6/+25
| | | | | | | | | | | | | | | | *) core/mod_http: use REQUEST meta buckets and a new HTTP/1.x specific input filter to separate the handling for HTTP requests from the handling of HTTP/1.x request parsing and checks. A new HTTP1_REQUEST_IN filter installs itself on http/1.1 connections before a request is being read. It generates either a REQUEST meta bucket on success or an ERROR bucket with the proposed response status. The core connection processing, relying on ap_read_request(), now expects a REQUEST or ERROR bucket from the input filters and is agnostic to specific HTTP versions and how they bring requests into the server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899799 13f79535-47bb-0310-9956-ffa450edef68
* Remove libsystemd dependency from main httpd binaryJoe Orton2022-04-121-0/+10
| | | | | | | | | | | | | | | Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries. This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin. Fixed mixed declaration and wrongly declared variable. Submitted by: Luboš Uhliarik <luhliari redhat.com> Github: closes #312 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899784 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_http: use RESPONSE meta buckets and a new HTTP/1.x specificStefan Eissing2022-04-071-0/+12
| | | | | | | | | | | | | | filter to send responses through the output filter chain. Specifically: the HTTP_HEADER output filter and ap_send_interim_response() create a RESPONSE bucket and no longer are concerned with HTTP/1.x serialization. A new HTTP1_RESPONSE_OUT transcode filter writes the proper HTTP/1.x bytes when dealing with a RESPONSE bucket. That filter installs itself on the pre_read_request hook when the connection has protocol 'http/1.1'. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899648 13f79535-47bb-0310-9956-ffa450edef68
* * Fix typoRuediger Pluem2022-04-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899558 13f79535-47bb-0310-9956-ffa450edef68
* *) core: add ap_h1_append_header() for single header values.Stefan Eissing2022-04-042-1/+12
| | | | | | | | | *) mod_proxy: use of new ap_h1_header(s) functions for formatting HTTP/1.1 requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899550 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_http/mod_http2:Stefan Eissing2022-04-044-2/+310
| | | | | | | | | | | | | | | | | | | - adds new meta bucket types REQUEST, RESPONSE and HEADERS to the API. - adds a new method for setting standard response headers Date and Server - adds helper methods for formatting parts of HTTP/1.x, like headers and end chunks for use in non-core parts of the server, e.g. mod_proxy - splits the HTTP_IN filter into a "generic HTTP" and "specific HTTP/1.x" filter. The latter one named HTTP1_BODY_IN. - Uses HTTP1_BODY_IN only for requests with HTTP version <= 1.1 - Removes the chunked input simulation from mod_http2 - adds body_indeterminate flag to request_rec that indicates that a request body may be present and needs to be read/discarded. This replaces logic that thinks without Content-Length and Transfer-Encoding, no request body can exist. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899547 13f79535-47bb-0310-9956-ffa450edef68
* *) core: adding a new hook and method to the API:Stefan Eissing2022-03-182-1/+29
| | | | | | | | | | | | | | | | | create_secondary_connection and ap_create_secondary_connection() to setup connections related to a "master" one, as used in the HTTP/2 protocol implementation. *) mod_http2: using the new API calls to get rid of knowledge about how the core handles conn_rec specifics. Improvements in pollset stream handling to use less sets. Using atomic read/writes instead of volatiles now. Keeping a reserve of "transit" pools and bucket_allocs for use on secondary connections to avoid repeated setup/teardowns. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899032 13f79535-47bb-0310-9956-ffa450edef68
* * Improve detection of _Thread_localRuediger Pluem2022-03-091-1/+3
| | | | | | | | | | GCC < 4.9 reports __STDC_VERSION__ >= 201112 but does not implement _Thread_local. Take care of this in the condition. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898771 13f79535-47bb-0310-9956-ffa450edef68
* * core/mpm: add hook 'child_stopped` that gets called when the MPM hasStefan Eissing2022-02-242-3/+21
| | | | | | | | | | stopped all processing in a child process. This is when all running threads shall be stopped and joined. [Stefan Eissing] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898369 13f79535-47bb-0310-9956-ffa450edef68
* Resolves BZ65861 - clarify post_config api docRich Bowen2022-02-231-0/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898347 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_ssl/mpm_event: reverting changes to nonblocing SSL handshakesStefan Eissing2022-02-044-8/+0
| | | | | | | | | | to stabilize CI tests again. Previous revision of trunk has been copied to branches/trunk-ssl-handshake-unblocking to make those into a PR where changes can be discussed and tested separately. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897760 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1897240 & r1897691: Syntax.Yann Ylavic2022-02-021-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897692 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1897240: Provide/export ap_thread_current_create()Yann Ylavic2022-02-021-0/+4
| | | | | | | | For completness, and possibly to ease backport to 2.4.x for MPM winnt. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897691 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1897240: Opt-out for AP_HAS_THREAD_LOCAL and/or pcre's ↵Yann Ylavic2022-02-021-5/+7
| | | | | | | | | | | | | | usage. If the compiler's thread_local is not efficient enough on some platforms, or not desired, have a way to disable its usage in httpd (at compile time). Handle -DAP_NO_THREAD_LOCAL and/or -DAPREG_NO_THREAD_LOCAL as build opt-out for thread_local usage in httpd gobally and/or in ap_regex only (respectively). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897689 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1897460: Provide ap_thread_main_create().Yann Ylavic2022-01-272-5/+5
| | | | | | | | | | | | | Replace ap_thread_current_create() by ap_thread_main_create() which is how it's used by httpd. The former is now a local helper only to implement the latter. This allows to consolidate/factorize common code in the main() of httpd and the unix MPMs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897543 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1897460: Implement and use ap_thread_current_after_fork().Yann Ylavic2022-01-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | thread_local variables are not (always?) reset on fork(), so we need a way to set the current_thread to NULL in the child process. Implement and use ap_thread_current_after_fork() for that. * include/httpd.h: Define ap_thread_current_after_fork(). * server/util.c: Implement ap_thread_current_after_fork(). * server/mpm/event/event.c, server/mpm/prefork/prefork.c, server/mpm/worker/worker.c: Use ap_thread_current_after_fork(). * server/mpm/winnt/child.c: Windows processes are not fork()ed and each child runs the main(), so ap_thread_current_create() was already called there. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897472 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1897460: !APR_HAS_THREAD implies no ap_thread_* either.Yann Ylavic2022-01-251-3/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897462 13f79535-47bb-0310-9956-ffa450edef68
* core: Efficient ap_thread_current() when apr_thread_local() is missing.Yann Ylavic2022-01-252-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #define ap_thread_create, ap_thread_current_create and ap_thread_current to their apr-1.8+ equivalent if available, or implement them using the compiler's thread_local mechanism if available, or finally provide stubs otherwise. #define AP_HAS_THREAD_LOCAL to 1 in the two former case or 0 otherwise, while AP_THREAD_LOCAL is defined to the compiler's keyword iff AP_HAS_THREAD_LOCAL. Replace all apr_thread_create() calls with ap_thread_create() so that httpd threads can use ap_thread_current()'s pool data as Thread Local Storage. Bump MMN minor. * include/httpd.h(): Define AP_HAS_THREAD_LOCAL, AP_THREAD_LOCAL (eventually), ap_thread_create(), ap_thread_current_create() and ap_thread_current(). * server/util.c: Implement ap_thread_create(), ap_thread_current_create() and ap_thread_current() when APR < 1.8. * modules/core/mod_watchdog.c, modules/http2/h2_workers.c, modules/ssl/mod_ssl_ct.c: Use ap_thread_create() instead of apr_thread_create. * server/main.c: Use AP_HAS_THREAD_LOCAL and ap_thread_current_create instead of APR's. * server/util_pcre.c: Use AP_HAS_THREAD_LOCAL and ap_thread_current instead of APR's. * server/mpm/event/event.c, server/mpm/worker/worker.c, server/mpm/prefork/prefork.c: Use ap_thread_create() instead of apr_thread_create. Create an apr_thread_t/ap_thread_current() for the main chaild thread usable at child_init(). * server/mpm/winnt/child.c: Use ap_thread_create() instead of CreateThread(). Create an apr_thread_t/ap_thread_current() for the main chaild thread usable git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897460 13f79535-47bb-0310-9956-ffa450edef68
* event: Add AP_MPM_CAN_AGAIN and AGAIN to signal to the MPM thatGraham Leggett2022-01-243-1/+7
| | | | | | | non blocking behaviour is requested. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897423 13f79535-47bb-0310-9956-ffa450edef68
* event: Add support for non blocking behaviour in theGraham Leggett2022-01-212-1/+3
| | | | | | | | | CONN_STATE_READ_REQUEST_LINE phase, in addition to the existing CONN_STATE_WRITE_COMPLETION phase. Update mod_ssl to perform non blocking TLS handshakes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897281 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Bump max worker name to 384 chars.Yann Ylavic2021-12-211-2/+4
| | | | | | | | | | The worker name is a fully qualified URI while the hostname's limit is 256 already, so potentially more than 256 are needed to store the name. Let's use 384. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896253 13f79535-47bb-0310-9956-ffa450edef68
* http: Enforce that fully qualified uri-paths not to be forward-proxiedYann Ylavic2021-12-132-1/+9
| | | | | | | | | | | | have an http(s) scheme, and that the ones to be forward proxied have a hostname, per HTTP specifications. The early checks avoid failing the request later on and thus save cycles for those invalid cases. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895921 13f79535-47bb-0310-9956-ffa450edef68
* Revert spurious commit r1895340.Yann Ylavic2021-11-251-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895341 13f79535-47bb-0310-9956-ffa450edef68
* Trigger ci.Yann Ylavic2021-11-251-0/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895340 13f79535-47bb-0310-9956-ffa450edef68
* Fix ap_mmn.h after r1893971.Yann Ylavic2021-10-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893981 13f79535-47bb-0310-9956-ffa450edef68
* core: Add ap_unescape_url_ex() for better decoding control, and deprecateYann Ylavic2021-10-072-1/+16
| | | | | | | | unused AP_NORMALIZE_DROP_PARAMETERS flag. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893971 13f79535-47bb-0310-9956-ffa450edef68
* Add dav_get_liveprop_element() to hide the implementation by whichGraham Leggett2021-09-261-2/+3
| | | | | | | the element is passed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893643 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors.Yann Ylavic2021-09-241-1/+2
| | | | | | | | | | | | | | | * modules/proxy/mod_proxy.h,modules/proxy/proxy_util.c: Add ap_proxy_fill_error_brigade() to factorize proxy error handling on the client connection side. * modules/proxy/mod_proxy_{http,ajp,uwsgi}.c: Use ap_proxy_fill_error_brigade() where needed, including when an empty brigade is returned on the backend side or when calling ap_proxy_buckets_lifetime_transform fails. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893595 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Restore ap_proxy_transfer_between_connections().Yann Ylavic2021-09-241-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/proxy/mod_proxy.h: Restore the interface of ap_proxy_transfer_between_connections() back to before MMN 20210506.0. Add ap_proxy_tunnel_conn_bytes_in() and ap_proxy_tunnel_conn_bytes_out(). New proxy_tunnel_conn_t typedef'ed from opaque struct proxy_tunnel_conn. * modules/proxy/mod_proxy.h(ap_proxy_tunnel_conn_get_read, ap_proxy_tunnel_conn_get_transferred): Axed/replaced by ap_proxy_tunnel_conn_bytes_in() and ap_proxy_tunnel_conn_bytes_out(). * modules/proxy/proxy_util.c(struct proxy_tunnel_conn): Replace "exchanged" by "bytes_in" and "bytes_out". * modules/proxy/proxy_util.c(proxy_transfer): New helper implementing ap_proxy_transfer_between_connections() and returning both &bytes_in and &bytes_out. * modules/proxy/proxy_util.c(ap_proxy_transfer_between_connections): Now calls proxy_transfer(). * modules/proxy/proxy_util.c(ap_proxy_tunnel_conn_bytes_in, ap_proxy_tunnel_conn_bytes_out): Return tc->bytes_in and tc->bytes_out respectively. * modules/proxy/proxy_util.c(proxy_tunnel_forward): Use proxy_transfer() which updates in->bytes_in, &out->bytes_out. tunnel->replied will be updated in proxy_tunnel_run(). * modules/proxy/proxy_util.c(proxy_tunnel_forward): Fall through the "done" label in any case to set tunnel->replied based on tunnel->client->bytes_out > 0. * modules/proxy/mod_proxy_http.c(ap_proxy_http_process_response): Use ap_proxy_tunnel_conn_bytes_{in,out}() for worker->s->{read,transferred} accounting. * modules/proxy/mod_proxy_http.c(proxy_http_async_finish): Update worker->s->{read,transferred} when async too. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893594 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: typedef struct proxy_tunnel_conn proxy_tunnel_conn_t.Yann Ylavic2021-09-241-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893593 13f79535-47bb-0310-9956-ffa450edef68
* In case one of the pre_connection hooks causes the hook run to stop by an errorRuediger Pluem2021-09-212-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | the pre_connection hook of the core module maybe did not run (it is APR_HOOK_REALLY_LAST) and hence we missed to - Put the socket in c->conn_config - Setup core output and input filters - Set socket options and timeouts For calls of ap_run_pre_connection where this matters create a wrapper named ap_pre_connection that ensures that this happens. * include/ap_mmn.h: Bump minor version as we added new ap_pre_connection function. * include/http_connection.h: Declare ap_pre_connection prototype. * server/connection.c: Make use of ap_pre_connection in ap_process_connection. * server/core.c: Implement ap_pre_connection. * server/mpm/event/event.c: Make use of ap_pre_connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893497 13f79535-47bb-0310-9956-ffa450edef68
* core: Add ap_create_connection() to create a server or client/proxy connection.Yann Ylavic2021-09-092-1/+24
| | | | | | | | | | | | | | | | | | | | | | c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that and this commit also replaces all the calls to ap_run_create_connection() in mod_proxy modules (not in the MPMs which create incoming connections only). * include/http_connection.h, server/connection.c: Declare and implement ap_create_connection(). * modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c, modules/proxy/mod_proxy_ftp.c: Use ap_create_connection() instead of ap_run_create_connection(), and don't provide a connection_id a scoreboard handle for outgoing connection. * server/log.c(do_errorlog_default): Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote" connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893184 13f79535-47bb-0310-9956-ffa450edef68
* *core: clarify comments and use hook API better to check for presence of ↵Stefan Eissing2021-09-091-3/+4
| | | | | | callbacks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893164 13f79535-47bb-0310-9956-ffa450edef68
* Fix some typo and doxygen issues.Christophe Jaillet2021-09-051-8/+8
| | | | | | | | | s/and array/an array/ Missing 's' so that @param match the names of the parameters of the function [skip ci] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892917 13f79535-47bb-0310-9956-ffa450edef68
* core: follow up to r1891148: WC bucket defaulting to FLUSH bucket.Yann Ylavic2021-08-202-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define WC bucket semantics as: /** * @brief Write Completion (WC) bucket * * A WC bucket is a FLUSH bucket with special ->data == &ap_bucket_wc_data, * still both AP_BUCKET_IS_WC() and APR_BUCKET_IS_FLUSH() hold for them so * they have the same semantics for most filters, namely: * Everything produced before shall be passed to the next filter, including * the WC/FLUSH bucket itself. * The distinction between WC and FLUSH buckets is only for filters that care * about write completion (calling ap_filter_reinstate_brigade() with non-NULL * flush_upto), those can setaside WC buckets and the preceding data provided * they have first determined that the next filter(s) have pending data * already, usually by calling ap_filter_should_yield(f->next). */ The only filters that care about write completion for now are ap_core_output_filter() and ssl_io_filter_output(), which try to fill in the pipe as much as possible, using ap_filter_reinstate_brigade(&flush_upto) to determine whether they should flush (blocking) or setaside their remaining data. So ap_filter_reinstate_brigade() is made to not treat WC as FLUSH buckets and keep the above filters working as before (and correctly w.r.t. above WC bucket semantics). * include/ap_mmn.h, include/util_filter.h: Axe specific ap_bucket_type_wc and define global &ap_bucket_wc_data address to mark WC buckets checked by AP_BUCKET_IS_WC(). * server/util_filter.c (ap_filter_reinstate_brigade): Don't treat WC buckets as FLUSH buckets. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892468 13f79535-47bb-0310-9956-ffa450edef68
* clarification/fixes around the replace() functionEric Covener2021-08-031-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891990 13f79535-47bb-0310-9956-ffa450edef68
* Corrected MODULE_MAGIC_NUMBER_MINOR.Stefan Eissing2021-07-311-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891924 13f79535-47bb-0310-9956-ffa450edef68
* * core/mpm: add hook 'child_stopping` that gets called when the MPM isStefan Eissing2021-07-312-0/+11
| | | | | | | | | stopping a child process. The additional `graceful` parameter allows registered hooks to free resources early during a graceful shutdown. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891919 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Avoid confusion of prefix/regex matching workers at loading. PR ↵Yann Ylavic2021-07-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 65429. ap_proxy_get_worker() needs to know whether it should lookup for prefix or match or both matching workers, depending on the context. For instance <Proxy[Match]> or ProxyPass[Match] directives need to lookup for an existing worker with the same type as the directive (*Match or not), because they will define one with that matching type if none exists. On the contrary, "ProxySet <url>" at load time or ap_proxy_pre_request() at run time need to find a worker matching an url whether it's by prefix or by regex. So this commit adds ap_proxy_get_worker_ex() which takes a bitmask for the matching type and calls it appropriately where needed. For consistency, ap_proxy_define_worker_ex() is also added, using the same bitmask flags, deprecating ap_proxy_define_match_worker(). Follow up to r1891206. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891284 13f79535-47bb-0310-9956-ffa450edef68
* core: Write Completion (WC) bucket type.Yann Ylavic2021-06-292-1/+27
| | | | | | | | | | | | | | | | | | A WC bucket is meant to prevent buffering/coalescing filters from retaining data, but unlike a FLUSH bucket it won't cause the core output filter to block trying to flush anything before. It can be passed by async handlers which want to never block, followed by ap_filter_should_yield() to check for pending data and eventually suspend processing until MPM/asynchronous write completion finishes. In this commit it's used that way by the tunneling loop of mod_proxy to prevent SSL coaslescing. gh: closes #200 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891148 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_proxy/mod_ssl:Stefan Eissing2021-06-083-1/+40
| | | | | | | | | | | | | | | | | | | | Adding `outgoing` flag to conn_rec, indicating a connection is initiated by the server to somewhere, in contrast to incoming connections from clients. Adding 'ap_ssl_bind_outgoing()` function that marks a connection as outgoing and is used by mod_proxy instead of the previous optional function `ssl_engine_set`. This enables other SSL module to secure proxy connections. The optional functions `ssl_engine_set`, `ssl_engine_disable` and `ssl_proxy_enable` are now provided by the core to have backward compatibility with non-httpd modules that might use them. mod_ssl itself no longer registers these functions, but keeps them in its header for backward compatibility. The core provided optional function wrap any registered function like it was done for `ssl_is_ssl`. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1890605 13f79535-47bb-0310-9956-ffa450edef68
* Allow the tunnelled connections to report theJean-Frederic Clere2021-05-061-1/+4
| | | | | | | read and trasnfered to the back-end worker. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889550 13f79535-47bb-0310-9956-ffa450edef68
* core/ap_ssl_*: changes after review by rpluemStefan Eissing2021-04-203-19/+9
| | | | | | | | | | | | | | | - removed no longer needed (char*) casts when looking up ssl variables. - move 'goto cleanup;' on separate source line - fixed check for wrong optional function in ap_run_ssl_var_lookup - remove ap_bytes_t again from httpd.h and passes now ocsp identifier as separate const char* and apr_size_t. This follows more how such data is passed in the rest of the server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889009 13f79535-47bb-0310-9956-ffa450edef68