]> git.ipfire.org Git - thirdparty/apache/httpd.git/log
thirdparty/apache/httpd.git
5 years agoAxe an empty line to synch with 2.4.x.
Christophe Jaillet [Sat, 23 May 2020 09:33:58 +0000 (09:33 +0000)] 
Axe an empty line to synch with 2.4.x.
This was a left over from r1855705 when it has been merged.

[skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878048 13f79535-47bb-0310-9956-ffa450edef68

5 years ago"" is appropriate default DEFAULT_REL_STATEDIR
Steffen Land [Wed, 20 May 2020 18:27:04 +0000 (18:27 +0000)] 
"" is appropriate default DEFAULT_REL_STATEDIR

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877959 13f79535-47bb-0310-9956-ffa450edef68

5 years agocore, protocol: reject invalid Content-Length ASAP.
Yann Ylavic [Wed, 20 May 2020 14:13:09 +0000 (14:13 +0000)] 
core, protocol: reject invalid Content-Length ASAP.

Don't let invalid invalid Content-Length header go beyond ap_read_request()
and protocol validation. The check in ap_http_filter() is still useful if
some modules mangles the header, but it's too late for the usual case.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877955 13f79535-47bb-0310-9956-ffa450edef68

5 years agocore,modules: provide/use ap_parse_strict_length() helper.
Yann Ylavic [Wed, 20 May 2020 14:01:17 +0000 (14:01 +0000)] 
core,modules: provide/use ap_parse_strict_length() helper.

It helps simplifying a lot of duplicated code based on apr_strtoff(), while
also rejecting leading plus/minus signs which are dissalowed in Content-Length
and (Content-)Range headers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877954 13f79535-47bb-0310-9956-ffa450edef68

5 years agolognos
Eric Covener [Sat, 16 May 2020 18:30:15 +0000 (18:30 +0000)] 
lognos

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877830 13f79535-47bb-0310-9956-ffa450edef68

5 years agoPR 64365: proxy_fcgi doesn't check expression before unsetting var
Eric Covener [Sat, 16 May 2020 18:28:50 +0000 (18:28 +0000)] 
PR 64365: proxy_fcgi doesn't check expression before unsetting var

Submitted By: Michael König <mail ikoenig.net>
Committed By: covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877829 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc rebuild.
Lucien Gentis [Sat, 16 May 2020 15:40:51 +0000 (15:40 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877820 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc XML file update.
Lucien Gentis [Sat, 16 May 2020 15:39:33 +0000 (15:39 +0000)] 
fr doc XML file update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877819 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: follow up to r1877397: fix SSL_OP_NO_RENEGOT*I*ATION typo.
Yann Ylavic [Fri, 15 May 2020 21:14:36 +0000 (21:14 +0000)] 
mod_ssl: follow up to r1877397: fix SSL_OP_NO_RENEGOT*I*ATION typo.

Should work better now :)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877795 13f79535-47bb-0310-9956-ffa450edef68

5 years agoFollow up to r1877785: ap_filter_should_yield() is not NULL safe :p
Yann Ylavic [Fri, 15 May 2020 13:22:56 +0000 (13:22 +0000)] 
Follow up to r1877785: ap_filter_should_yield() is not NULL safe :p

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877787 13f79535-47bb-0310-9956-ffa450edef68

5 years agoap_filter_output_pending(): test where each filter should yield after running.
Yann Ylavic [Fri, 15 May 2020 12:27:13 +0000 (12:27 +0000)] 
ap_filter_output_pending(): test where each filter should yield after running.

Since running a filter may pass data next to it, ap_filter_output_pending()
should test for ap_filter_should_yield(f->next) after each f call, otherwise
it won't take into account new pending data in filters it just walked.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877785 13f79535-47bb-0310-9956-ffa450edef68

5 years ago *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
Stefan Eissing [Fri, 15 May 2020 11:59:32 +0000 (11:59 +0000)] 
  *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
     was configured with a handshake timeout. Fixes gitub issue #196.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877783 13f79535-47bb-0310-9956-ffa450edef68

5 years agoInclude Angle-bracket form to Quoted form
Steffen Land [Thu, 14 May 2020 12:09:11 +0000 (12:09 +0000)] 
Include Angle-bracket form to  Quoted form

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877740 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy: binary search for ProxyErrorOverride status codes.
Yann Ylavic [Thu, 14 May 2020 09:02:13 +0000 (09:02 +0000)] 
mod_proxy: binary search for ProxyErrorOverride status codes.

The list can be rather long, speed up runtime by sorting the status codes in
error_override_codes and using binary search from ap_proxy_should_override().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877728 13f79535-47bb-0310-9956-ffa450edef68

5 years agomention relative path behavior, offline question
Eric Covener [Wed, 13 May 2020 20:44:42 +0000 (20:44 +0000)] 
mention relative path behavior, offline question

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877708 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: follow up to r1877696: reindent.
Yann Ylavic [Wed, 13 May 2020 15:00:06 +0000 (15:00 +0000)] 
mod_proxy_http: follow up to r1877696: reindent.

No functional changes.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877697 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: axe ap_proxy_should_override() duplicate checks.
Yann Ylavic [Wed, 13 May 2020 14:54:51 +0000 (14:54 +0000)] 
mod_proxy_http: axe ap_proxy_should_override() duplicate checks.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877696 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: follow up to r1877646: send Upgrade header with 101 response.
Yann Ylavic [Wed, 13 May 2020 14:25:25 +0000 (14:25 +0000)] 
mod_proxy_http: follow up to r1877646: send Upgrade header with 101 response.

Also, add a comment about why we forward the Upgrade header in non-101
responses provided the protocol matches the upgrade= configuration.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877695 13f79535-47bb-0310-9956-ffa450edef68

5 years agoWindows : do not include ap_config_auto.h
Steffen Land [Wed, 13 May 2020 13:44:14 +0000 (13:44 +0000)] 
Windows : do not include ap_config_auto.h

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877693 13f79535-47bb-0310-9956-ffa450edef68

5 years agoWindows bits for mod_log_json.dsp
Steffen Land [Wed, 13 May 2020 10:43:05 +0000 (10:43 +0000)] 
Windows bits for mod_log_json.dsp

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877688 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: handle Upgrade requests and upgraded protocol forwarding.
Yann Ylavic [Tue, 12 May 2020 12:20:57 +0000 (12:20 +0000)] 
mod_proxy_http: handle Upgrade requests and upgraded protocol forwarding.

If the request Upgrade header matches the worker upgrade= parameter and
the backend switches the protocol, do the tunneling in mod_proxy_http.
This allows to keep the protocol to HTTP until the backend really
switches the protocol, and apply usual output filters.

When configured to forward Upgrade mechanism, we want the backend to be
able to announce its Upgrade protocol to the client (e.g. with 426
Upgrade Required response) and thus forward back the Upgrade header that
matches the one(s) configured in the worker upgrade= parameter.

modules/proxy/mod_proxy.h:
modules/proxy/proxy_util.c:
    ap_proxy_worker_can_upgrade(): added helper to determine whether a
    proxy worker is configured to forward an Upgrade protocol.

include/ap_mmn.h:
    Bump MMN minor for ap_proxy_worker_can_upgrade().

modules/proxy/mod_proxy.c:
    set_worker_param(): handle worker parameter upgrade=ANY as upgrade=*
    (should the "any" protocol scheme be something some day..).

modules/proxy/mod_proxy_wstunnel.c:
    proxy_wstunnel_handler(): use ap_proxy_worker_can_upgrade() to match
    the Upgrade header. Axe handling of upgrade=NONE, it makes no sense to
    Upgrade a connection if the client did not ask for it, nor to configure
    mod_proxy_wstunnel to use a worker with upgrade=NONE by the way.

modules/proxy/mod_proxy_http.c:
    proxy_http_req_t: add fields force10 (force HTTP/1.0) and upgrade (value
    of the Upgrade header sent by the client if it matches the configuration,
    NULL otherwise).
    proxy_http_handler(): use ap_proxy_worker_can_upgrade() to determine
    whether the request is electable for end to end protocol upgrading and set
    req->upgrade accordingly.
    terminate_headers(): handle Connection and Upgrade headers to send to the
    backend, according to req->force10 and req->upgrade set before.
    ap_proxy_http_prefetch(): use req->force10 and terminate_headers().
    send_continue_body(): added helper to send the body retained for end to
    end 100-continue handling.
    ap_proxy_http_process_response(): use ap_proxy_worker_can_upgrade() to
    match the response Upgrade header and forward it back if it matches the
    configured one(s). That is for 101 Switching Protocol obviously but also
    any other status code which is not overidden, at the backend wish. If the
    protocol is switching, create a proxy tunnel and run it, using the minimal
    timeout from the client or backend connection.

Github: closes #125

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877646 13f79535-47bb-0310-9956-ffa450edef68

5 years agoap_log_pid(): Windown does not implement apr_file_perms_set(), not a failure.
Yann Ylavic [Tue, 12 May 2020 11:33:54 +0000 (11:33 +0000)] 
ap_log_pid(): Windown does not implement apr_file_perms_set(), not a failure.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877645 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_md: update duplicated APLOGNOs.
Yann Ylavic [Tue, 12 May 2020 09:53:50 +0000 (09:53 +0000)] 
mod_md: update duplicated APLOGNOs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877642 13f79535-47bb-0310-9956-ffa450edef68

5 years agolisten.c: follow up to r1876865: update APLOGNO.
Yann Ylavic [Tue, 12 May 2020 09:52:31 +0000 (09:52 +0000)] 
listen.c: follow up to r1876865: update APLOGNO.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877641 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAdd Win build mod_log_json.dsp
Steffen Land [Tue, 12 May 2020 07:33:05 +0000 (07:33 +0000)] 
Add  Win build mod_log_json.dsp

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877630 13f79535-47bb-0310-9956-ffa450edef68

5 years agoadd include to test_char.h now required
Gregg Lewis Smith [Mon, 11 May 2020 16:47:18 +0000 (16:47 +0000)] 
add include to test_char.h now required

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877590 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: follow up to r1877557.
Yann Ylavic [Sun, 10 May 2020 21:23:14 +0000 (21:23 +0000)] 
mod_proxy_http: follow up to r1877557.

Yet better, call proxy_run_detach_backend() at the caller.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877558 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_proxy_http: single point of failure in ap_proxy_http_process_response().
Yann Ylavic [Sun, 10 May 2020 20:52:30 +0000 (20:52 +0000)] 
mod_proxy_http: single point of failure in ap_proxy_http_process_response().

No functional change (intended).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877557 13f79535-47bb-0310-9956-ffa450edef68

5 years agompm_event: reset listener_is_wakeable on reload.
Yann Ylavic [Sun, 10 May 2020 15:24:10 +0000 (15:24 +0000)] 
mpm_event: reset listener_is_wakeable on reload.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877552 13f79535-47bb-0310-9956-ffa450edef68

5 years agoutil_md5: avoid temporary stack result in ap_md5_binary().
Yann Ylavic [Sun, 10 May 2020 15:23:08 +0000 (15:23 +0000)] 
util_md5: avoid temporary stack result in ap_md5_binary().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877551 13f79535-47bb-0310-9956-ffa450edef68

5 years agoutil_expr: allow to specify only one of ap_expr_eval_ctx_t's r/c/s.
Yann Ylavic [Sun, 10 May 2020 15:15:21 +0000 (15:15 +0000)] 
util_expr: allow to specify only one of ap_expr_eval_ctx_t's r/c/s.

Depending on where the expression is evaluated, a request_rec might not be
available, so allow to specify only a conn_rec or a server_rec (at least) in
the passed in ap_expr_eval_ctx_t.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877550 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: destroy temporary pool on stapling_renew_response() failure.
Yann Ylavic [Sun, 10 May 2020 12:58:26 +0000 (12:58 +0000)] 
mod_ssl: destroy temporary pool on stapling_renew_response() failure.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877549 13f79535-47bb-0310-9956-ffa450edef68

5 years agoutil_filter: export ap_filter_adopt_brigade() since mod_ssl uses it.
Yann Ylavic [Sun, 10 May 2020 12:34:53 +0000 (12:34 +0000)] 
util_filter: export ap_filter_adopt_brigade() since mod_ssl uses it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877548 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc rebuild.
Lucien Gentis [Sat, 9 May 2020 14:16:27 +0000 (14:16 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877533 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc XML files updates.
Lucien Gentis [Sat, 9 May 2020 14:15:31 +0000 (14:15 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877532 13f79535-47bb-0310-9956-ffa450edef68

5 years agoUpdate mod_proxy_html docs to reflect
Nick Kew [Fri, 8 May 2020 22:39:36 +0000 (22:39 +0000)] 
Update mod_proxy_html docs to reflect
https://lists.apache.org/thread.html/rc26df3094f42cfa742690282b4430483d56f85f3e033337b1a08ec53%40%3Cusers.httpd.apache.org%3E

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877522 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Update the ssl_var_lookup() API:
Joe Orton [Thu, 7 May 2020 15:34:04 +0000 (15:34 +0000)] 
mod_ssl: Update the ssl_var_lookup() API:
a) constify return value and variable name passed-in
b) require that pool argument is non-NULL
c) add gcc warning attributes for NULL arguments or ignored result.

This allows removal of inefficient internal duplication of constant
strings which was necessary only to allow non-const char *, and
removal of unsafe casts to/from const in various places.

* modules/ssl/ssl_engine_vars.c (ssl_var_lookup): Assume pool is
  non-NULL; return constant and remove apr_pstrdup of constant
  result string.  Also constify variable name.
  (ssl_var_lookup_*): Update to return const char * and avoid
  duplication where now possible.

* modules/ssl/mod_ssl.h: Update ssl_var_lookup() optional function
  API description and add GCC warning attributes as per private API.

* modules/ssl/ssl_engine_init.c (ssl_add_version_components): Adjust
  for const return value.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_handshake): Pass c->pool
  to ssl_var_lookup.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Pass r->pool to
  ssl_var_lookup, expect const return and dup the string since r->user
  is char *.
  (log_tracing_state): Pass c->pool to ssl_var_lookup.

* modules/http2/h2_h2.c (h2_is_acceptable_connection): Assume
  return value of ssl_var_lookup is const.

Github: closes #120

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877475 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* os/win32/win32_config_layout: Define DEFAULT_REL_STATEDIR for Win32.
Joe Orton [Thu, 7 May 2020 11:38:29 +0000 (11:38 +0000)] 
* os/win32/win32_config_layout: Define DEFAULT_REL_STATEDIR for Win32.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877471 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Drop SSLRandomSeed implementation with OpenSSL 1.1.1.
Joe Orton [Thu, 7 May 2020 10:34:12 +0000 (10:34 +0000)] 
mod_ssl: Drop SSLRandomSeed implementation with OpenSSL 1.1.1.
Require that OpenSSL is configured with a suitable entropy source,
or fail startup otherwise.

* modules/ssl/ssl_private.h:
  Define MODSSL_USE_SSLRAND for OpenSSL < 1.1.1.
  (SSLModConfigRec): Only define pid, aRandSeed for <1.1.1.
  (ssl_rand_seed): Define as noop if !MODSSL_USE_SSLRAND.

* modules/ssl/ssl_engine_init.c (ssl_init_Module):
  Only initialize mc->pid for MODSSL_USE_SSLRAND.
  Fail if RAND_status() returns zero.
  (ssl_init_Child): Drop getpid and srand for !MODSSL_USE_SSLRAND.

* modules/ssl/ssl_engine_rand.c: ifdef-out for !MODSSL_USE_SSLRAND.
  (ssl_rand_seed): Drop warning if PRNG not seeded (now a startup
  error as above).

* modules/ssl/ssl_engine_config.c (ssl_config_global_create): Drop
  aRandSeed initialization.  (ssl_cmd_SSLRandomSeed): Log a warning if
  used w/!MODSSL_USE_SSLRAND.

Github: closes #123

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877467 13f79535-47bb-0310-9956-ffa450edef68

5 years agoap_core_input_filter(): axe unnecessary AP_MODE_SPECULATIVE test.
Yann Ylavic [Wed, 6 May 2020 19:52:47 +0000 (19:52 +0000)] 
ap_core_input_filter(): axe unnecessary AP_MODE_SPECULATIVE test.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877455 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Minor cleanup to avoid defining init handling functions for
Joe Orton [Wed, 6 May 2020 15:30:14 +0000 (15:30 +0000)] 
mod_ssl: Minor cleanup to avoid defining init handling functions for
pre-1.1 builds where they are noops or unused.  No functional change
(intended).

* modules/ssl/mod_ssl.c: Define NEED_MANUAL_OPENSSL_INIT for builds
  where pre-1.1 OpenSSL needs "manual" initialization/cleanup.  Only
  define modssl_running_statically for this case (otherwise it is set
  and never read).
  (modssl_is_prelinked): Only define for NEED_MANUAL_OPENSSL_INIT.
  (ssl_cleanup_pre_config): Only define for NEED_MANUAL_OPENSSL_INIT;
  otherwise it is a noop returning APR_SUCCESS;
  (ssl_hook_pre_config): Only install the cleanup and initialize
  modssl_is_prelinked for NEED_MANUAL_OPENSSL_INIT build.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877440 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Switch to using SSL_OP_NO_RENEGOTATION (where available) to
Joe Orton [Tue, 5 May 2020 12:40:38 +0000 (12:40 +0000)] 
mod_ssl: Switch to using SSL_OP_NO_RENEGOTATION (where available) to
block client-initiated renegotiation with TLSv1.2 and earlier.

* modules/ssl/ssl_private.h: Define modssl_reneg_state enum,
  modssl_set_reneg_state function.

* modules/ssl/ssl_engine_io.c (bio_filter_out_write,
  bio_filter_in_read): #ifdef-out reneg protection if
  SSL_OP_NO_RENEGOTATION is defined.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_protocol):
  Enable SSL_OP_NO_RENEGOTATION.
  (ssl_init_ctx_callbacks): Only enable the "info" callback if
  debug-level logging *or* OpenSSL doesn't support SSL_OP_NO_RENEGOTATION.

* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access_classic): Use
  modssl_set_reneg_state to set the reneg protection mode.
  (ssl_hook_Access_modern): Drop manipulation of the reneg mode which
  does nothing for TLSv1.3 already.
  (ssl_callback_Info): Only enable reneg protection if
  SSL_OP_NO_RENEGOTATION is *not* defined.

* modules/ssl/ssl_util_ssl.c (modssl_set_reneg_state): New function.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877397 13f79535-47bb-0310-9956-ffa450edef68

5 years agoclarify, context is still CGI only.
Eric Covener [Tue, 5 May 2020 11:44:59 +0000 (11:44 +0000)] 
clarify, context is still CGI only.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877394 13f79535-47bb-0310-9956-ffa450edef68

5 years agoConstify pointers in ap_expr lookup tables, as well as the already
Joe Orton [Mon, 4 May 2020 10:48:55 +0000 (10:48 +0000)] 
Constify pointers in ap_expr lookup tables, as well as the already
const pointed-to strings.  ~1/2Kb moves to r/o text section, size(1)
diff:

    text           data     bss     dec     hex filename
- 667519          18384   13952  699855   aadcf httpd
+ 668015          17864   13952  699831   aadb7 httpd

* server/util_expr_eval.c
  [*_var_names, expr_provider_multi]: Mark pointers in name
  lists as const.
  (core_expr_lookup): Adjust accordingly.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877350 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Calculate the MD5 digest used as the session context once per
Joe Orton [Mon, 4 May 2020 09:23:03 +0000 (09:23 +0000)] 
mod_ssl: Calculate the MD5 digest used as the session context once per
vhost at startup, rather than building it for each new connection.

* modules/ssl/ssl_private.h (struct SSLSrvConfigRec):
  Replace vhost_id_len field with vhost_md5.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Build the
  sc->vhost_md5 hash here.

* modules/ssl/mod_ssl.c: Fail at compile time if the
  SSL_set_session_id_context() API constraint on context length is
  violated.
  (ssl_init_ssl_connection): Use sc->vhost_md5.

* modules/ssl/ssl_engine_kernel.c (ssl_find_vhost): Use sc->vhost_md5
  after renegotiation.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877349 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/ssl/ssl_util.c (ssl_asn1_table_set): Remove unused function.
Joe Orton [Mon, 4 May 2020 09:00:29 +0000 (09:00 +0000)] 
* modules/ssl/ssl_util.c (ssl_asn1_table_set): Remove unused function.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877348 13f79535-47bb-0310-9956-ffa450edef68

5 years agoPrior to r1877345 mc->pPool was the process pool (s->process->pool).
Joe Orton [Mon, 4 May 2020 08:58:02 +0000 (08:58 +0000)] 
Prior to r1877345 mc->pPool was the process pool (s->process->pool).
Drop the field from SSLModConfigRec and use pconf instead (where
appropriate) to match the new SSLModConfigRec lifetime.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_DelSessionCacheEntry):
  Explicitly (and probably unsafely) use the process pool.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLRandomSeed): Use
  cmd->pool to allocate paths.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Use pconf
  to allocate the keylog_file.

* modules/ssl/ssl_engine_vars.c (ssl_var_lookup): Drop lookup
  of SSLModConfigRec and use s->process->pool when no pool is
  passed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877347 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/ssl/ssl_engine_config.c (ssl_config_global_create):
Joe Orton [Mon, 4 May 2020 08:37:40 +0000 (08:37 +0000)] 
* modules/ssl/ssl_engine_config.c (ssl_config_global_create):
  apr_pcalloc SSLModConfigRec, remove ifdef-maze setting fields to zero.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877346 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Use retained data API for storing private keys across reloads.
Joe Orton [Mon, 4 May 2020 08:32:23 +0000 (08:32 +0000)] 
mod_ssl: Use retained data API for storing private keys across reloads.
Allocate SSLModConfigRec from pconf rather than the process pool.

* modules/ssl/ssl_private.h: Add modssl_retained_data_t structure and
  move private key storage here from SSLModConfigRec.  Add retained
  pointer to SSLModConfigRec.

* modules/ssl/ssl_engine_config.c (ssl_config_global_create): Take
  pool argument; allocate SSLModConfigRec from there and
  initialize mc->retained.  SSLModConfigRec no longer cached for the
  process lifetime.
  (ssl_init_Module): Sanity check that sc->mc is correct.
  (ssl_init_server_certs): Use private keys from mc->retained.

* modules/ssl/ssl_engine_pphrase.c
  (privkey_vhost_keyid): Rename from asn1_table_vhost_key and
  update to use the retained structure.
  (ssl_load_encrypted_pkey): Update for above.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Remove
  (apparently) redundant call to ssl_config_global_create and
  add debug asserts to validate that is safe.

Github: closes #119

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877345 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc rebuild.
Lucien Gentis [Sat, 2 May 2020 13:22:57 +0000 (13:22 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877296 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc XML file update.
Lucien Gentis [Sat, 2 May 2020 13:22:05 +0000 (13:22 +0000)] 
fr doc XML file update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877295 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Factor out code to read a BIO into a palloc'ed string:
Joe Orton [Sat, 2 May 2020 10:56:31 +0000 (10:56 +0000)] 
mod_ssl: Factor out code to read a BIO into a palloc'ed string:

* modules/ssl/ssl_util_ssl.c (modssl_bio_free_read): New function.
  (asn1_string_convert): Use it here.

* modules/ssl/ssl_engine_vars.c: Use it throughout.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877291 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/ssl/ssl_engine_init.c (ssl_add_version_components,
Joe Orton [Fri, 1 May 2020 16:08:13 +0000 (16:08 +0000)] 
* modules/ssl/ssl_engine_init.c (ssl_add_version_components,
  ssl_init_Module): Use temporary pool for variable lookup results
  which don't need to live in pconf.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877263 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/ssl/ssl_engine_init.c (ssl_init_Module): Pass base_server in
Joe Orton [Fri, 1 May 2020 15:19:50 +0000 (15:19 +0000)] 
* modules/ssl/ssl_engine_init.c (ssl_init_Module): Pass base_server in
  OpenSSL init log message rather than NULL (and likely dropping the
  log entry).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877262 13f79535-47bb-0310-9956-ffa450edef68

5 years agoMove FIPS mode config option to SSLModConfigRec since it is a global
Joe Orton [Fri, 1 May 2020 15:15:59 +0000 (15:15 +0000)] 
Move FIPS mode config option to SSLModConfigRec since it is a global
SSL library setting.  Additionally, always log the FIPS mode since it
can be set outside of the httpd config.

* modules/ssl/ssl_private.h (SSLModConfigRec): Move fips field here.
  (SSLSrvConfigRec): ... from here.

* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLFIPS): Adjust for fips
  field move.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Adjust for fips
  field move.  Always log the OpenSSL FIPS mode state even if SSLFIPS
  is not used.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877261 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* support/passwd_common.c (mkhash): Fix salt buffer size for SHA2
Joe Orton [Fri, 1 May 2020 08:17:32 +0000 (08:17 +0000)] 
* support/passwd_common.c (mkhash): Fix salt buffer size for SHA2
  (caught by gcc 10).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877251 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAdd gcc-10 job, drop gcc-9 config from allow_failures (seems stable again).
Joe Orton [Fri, 1 May 2020 08:17:16 +0000 (08:17 +0000)] 
Add gcc-10 job, drop gcc-9 config from allow_failures (seems stable again).
Use -O2 for all gcc -Werror jobs otherwise warnings triggered under e.g.
aggressive inlining are not found.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877250 13f79535-47bb-0310-9956-ffa450edef68

5 years agoTravis docs updates. [skip ci]
Joe Orton [Tue, 28 Apr 2020 07:21:04 +0000 (07:21 +0000)] 
Travis docs updates. [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877122 13f79535-47bb-0310-9956-ffa450edef68

5 years agoEnable Travis notifications for trunk per dev@ consensus.
Joe Orton [Tue, 28 Apr 2020 07:16:23 +0000 (07:16 +0000)] 
Enable Travis notifications for trunk per dev@ consensus.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877121 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* We have five providers [skip ci]
Ruediger Pluem [Tue, 28 Apr 2020 06:06:29 +0000 (06:06 +0000)] 
* We have five providers [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877119 13f79535-47bb-0310-9956-ffa450edef68

5 years agoutil_filter: axe misleading AP_BUCKET_IS_MORPHING() macro and fix comments.
Yann Ylavic [Mon, 27 Apr 2020 14:22:04 +0000 (14:22 +0000)] 
util_filter: axe misleading AP_BUCKET_IS_MORPHING() macro and fix comments.

Morphing buckets are not only those with ->length == -1, so the macro is
misleading. Modify comments to talk about opaque buckets when length == -1
and about morphing buckets (once) for opaque and FILE buckets.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877077 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc rebuild.
Lucien Gentis [Sat, 25 Apr 2020 15:38:21 +0000 (15:38 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876987 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc XML files updates.
Lucien Gentis [Sat, 25 Apr 2020 15:37:20 +0000 (15:37 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876986 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: follow up to r1876934: use OPENSSL_cleanse().
Yann Ylavic [Fri, 24 Apr 2020 21:29:42 +0000 (21:29 +0000)] 
mod_ssl: follow up to r1876934: use OPENSSL_cleanse().

memset() might be optimized away by the compiler since buf[] (on the stack)
is not used anymore.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876950 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: follow up to r1876934: wrap DH_bits()
Yann Ylavic [Fri, 24 Apr 2020 17:14:21 +0000 (17:14 +0000)] 
mod_ssl: follow up to r1876934: wrap DH_bits()

DH_get0_p() seems to be undefined for some openssl versions, so it can't
be used to implement DH_bits() generically.

Add new a modssl_DH_bits() wrapper to call DH_bits() for openssl < 3,
and BN_num_bits(DH_get0_p(dh)) otherwise.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876938 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: follow up to r1876934: OSSL_PARAM_construct_*() make no copy.
Yann Ylavic [Fri, 24 Apr 2020 17:04:28 +0000 (17:04 +0000)] 
mod_ssl: follow up to r1876934: OSSL_PARAM_construct_*() make no copy.

Pass OSSL_PARAM_construct_octet_string() an explicit copy of the MAC key
to avoid saving a pointer to stack.

While at it, cleanup secret data from buf before leaving.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876937 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: follow up to r1876934: fix !modssl_X509_STORE_load_locations() logic.
Yann Ylavic [Fri, 24 Apr 2020 16:29:02 +0000 (16:29 +0000)] 
mod_ssl: follow up to r1876934: fix !modssl_X509_STORE_load_locations() logic.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876936 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: add compatibility with OpenSSL 3.0.0
Yann Ylavic [Fri, 24 Apr 2020 16:09:02 +0000 (16:09 +0000)] 
mod_ssl: add compatibility with OpenSSL 3.0.0

Wrappers around deprecated API:
* X509_STORE_load_locations() => modssl_X509_STORE_load_locations(),
* CTX_load_verify_locations() => modssl_CTX_load_verify_locations(),
* ERR_peek_error_line_data()  => modssl_ERR_peek_error_data(),
* DH_bits(dh)                 => BN_num_bits(DH_get0_p(dh)).

Provide a compatible version of ssl_callback_SessionTicket() which does not
use the deprecated HMAC_CTX and HMAC_Init_ex(), replaced by EVP_MAC_CTX and
EVP_MAC_CTX_set_params() respectively. This requires adapting struct
modssl_ticket_key_t to replace hmac_secret[] with OSSL_PARAM mac_params[],
created once at load time still.
The callback is registered by SSL_CTX_set_tlsext_ticket_key_evp_cb() instead
of SSL_CTX_set_tlsext_ticket_key_cb().

Since BIO_eof() may now be called openssl-3 state machine, the never-called
assertion in bio_filter_in_ctrl() does not hold anymore, and we have to
handle BIO_CTRL_EOF. For any other cmd, we continue to AP_DEBUG_ASSERT(0) and
log an error, yet the return value is changed from -1 to 0 which is the usual
unhandled value.

Note that OpenSSL 3.0.0 is still in alpha stage as of now, the API shouldn't
change though, neither breakage to 1.x.x API.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876934 13f79535-47bb-0310-9956-ffa450edef68

5 years agoRevert r1876869 because on trunk server/listen.c
Rainer Jung [Thu, 23 Apr 2020 10:18:12 +0000 (10:18 +0000)] 
Revert r1876869 because on trunk server/listen.c
also has a dependency on libsystemd.
Thanks to jorton for pointing it out.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876873 13f79535-47bb-0310-9956-ffa450edef68

5 years agosystemd dependencies are only needed by mod_systemd.
Rainer Jung [Thu, 23 Apr 2020 08:52:45 +0000 (08:52 +0000)] 
systemd dependencies are only needed by mod_systemd.
They should currently not be needed by httpd directly
or any other binary. So no need to add them to
HTTPD_LIBS.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876869 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAdd optional options= argument to Listen to add listener-specific
Joe Orton [Thu, 23 Apr 2020 08:26:26 +0000 (08:26 +0000)] 
Add optional options= argument to Listen to add listener-specific
socket options.

Reimplement "use_specific_errors" listener flag under generic
ap_listen_rec flags field holding all listener-specific options.

* include/ap_listen.h: Add AP_LISTEN_* flags.
  (ap_listen_rec): Rename use_specific_errors to flags.

* server/listen.c (make_sock): Set APR_SO_FREEBIND if
  AP_LISTEN_FREEBIND flag is set on listener; set APR_SO_REUSEPORT
  unconditionally if AP_LISTEN_REUSEPORT is set.
  (alloc_listener): Take flags argument.
  (ap_setup_listeners): Set AP_LISTEN_SPECIFIC_ERRORS flag here.
  (ap_set_listener): Parse optional options=... argument, catch
  typos and fail if protocol name contains a "=".
  (ap_duplicate_listeners): Duplicate flags.

Submitted by: jkaluza, Lubos Uhliarik <luhliari redhat.com>, jorton
PR: 61865
Github: closes #114

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876865 13f79535-47bb-0310-9956-ffa450edef68

5 years agoconfig: allow for environment variable substitution fallback to default value.
Yann Ylavic [Wed, 22 Apr 2020 16:30:58 +0000 (16:30 +0000)] 
config: allow for environment variable substitution fallback to default value.

Make ap_resolve_env() handle the ${VAR?=default value} syntax, and update docs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876835 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/filters/mod_proxy_html.c: Fix proxy_html_conf.bufsz
Joe Orton [Wed, 22 Apr 2020 11:25:40 +0000 (11:25 +0000)] 
* modules/filters/mod_proxy_html.c:  Fix proxy_html_conf.bufsz
  to have correct type, as it is used with ap_set_int_slot.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876823 13f79535-47bb-0310-9956-ffa450edef68

5 years agosort safe_env_lst
Giovanni Bechis [Wed, 22 Apr 2020 06:53:55 +0000 (06:53 +0000)] 
sort safe_env_lst
bz 65371

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876815 13f79535-47bb-0310-9956-ffa450edef68

5 years agobe less specific and don't echo passphrase
Eric Covener [Wed, 22 Apr 2020 01:16:00 +0000 (01:16 +0000)] 
be less specific and don't echo passphrase

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876807 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/ssl/ssl_engine_io.c (ssl_io_filter_coalesce): Update comment only. [skip ci]
Joe Orton [Tue, 21 Apr 2020 11:15:09 +0000 (11:15 +0000)] 
* modules/ssl/ssl_engine_io.c (ssl_io_filter_coalesce): Update comment only. [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876787 13f79535-47bb-0310-9956-ffa450edef68

5 years agocore: follow up to r1876664: allow ErrorDocument to read body when applicable
Yann Ylavic [Tue, 21 Apr 2020 10:29:07 +0000 (10:29 +0000)] 
core: follow up to r1876664: allow ErrorDocument to read body when applicable

Unless ap_read_request() failed to read the request line or header, or
Transfer-Encoding is invalid, we can still provide the request body to custom
error handlers (ErrorDocument) that ask it (e.g. internal redirects to CGI).

So this commit splits early failure path (previously die_early label) in two,
die_unusable_input and die_before_hooks, where the latter preserves input
filters (including HTTP_IN).

Also, the code to apply the connection timeout and r->per_dir_config from the
server is now in a new apply_server_config() helper since it's used multiple
times. Note that apr_socket_timeout_set() is a noop if the new timeout is the
same as the one already in place, so there is no need to cache the old timeout
nor use apr_socket_timeout_get(). Likewise, r->server is initially set to
c->base_server so apply_server_config() is overall a noop when no change is
needed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876784 13f79535-47bb-0310-9956-ffa450edef68

5 years agor1876779 follow-up.
Christophe Jaillet [Tue, 21 Apr 2020 10:18:08 +0000 (10:18 +0000)] 
r1876779 follow-up.

strcmp returns 0 if strings match, i.e. TLS/1.0 is found.
ap_find_token returns 1 if TLS/1.0 is found.

So the test has to be reversed to keep the same behavior

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876783 13f79535-47bb-0310-9956-ffa450edef68

5 years agoFix the way we are looking for "TLS/1.0" tokens.
Christophe Jaillet [Tue, 21 Apr 2020 09:02:20 +0000 (09:02 +0000)] 
Fix the way we are looking for "TLS/1.0" tokens.
ap_find_token() is more robust than expecting the token to be the first one in the 'Upgrade' header field.

(see modules/ssl/ssl_engine_kernel.c#284)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876779 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* support/suexec.c (main): Report error string after failure from
Joe Orton [Mon, 20 Apr 2020 09:31:25 +0000 (09:31 +0000)] 
* support/suexec.c (main): Report error string after failure from
  setgid/initgroups or setuid.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876745 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* support/suexec.c (safe_strtol): New function.
Joe Orton [Mon, 20 Apr 2020 09:25:39 +0000 (09:25 +0000)] 
* support/suexec.c (safe_strtol): New function.
  (main): Use ^ to be avoid using atoi(); try to catch more string to
  integer and integer to uid/gid conversion errors/surprises.

PR: 33207

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876744 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: axe useless X509_free (NULL arg).
Yann Ylavic [Sun, 19 Apr 2020 10:32:16 +0000 (10:32 +0000)] 
mod_ssl: axe useless X509_free (NULL arg).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876719 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc rebuild.
Lucien Gentis [Sat, 18 Apr 2020 14:54:34 +0000 (14:54 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876697 13f79535-47bb-0310-9956-ffa450edef68

5 years agofr doc XML files updates.
Lucien Gentis [Sat, 18 Apr 2020 14:53:24 +0000 (14:53 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876696 13f79535-47bb-0310-9956-ffa450edef68

5 years agogdbinit: print bucket fd when available.
Yann Ylavic [Fri, 17 Apr 2020 17:53:19 +0000 (17:53 +0000)] 
gdbinit: print bucket fd when available.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876679 13f79535-47bb-0310-9956-ffa450edef68

5 years agogdbinit: more address colomn space for 64bit.
Yann Ylavic [Fri, 17 Apr 2020 17:52:24 +0000 (17:52 +0000)] 
gdbinit: more address colomn space for 64bit.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876678 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_watchdog: use a single "wd_running" pool in wd_worker() thread.
Yann Ylavic [Fri, 17 Apr 2020 17:15:51 +0000 (17:15 +0000)] 
mod_watchdog: use a single "wd_running" pool in wd_worker() thread.

Clear the pool where appropriate instead of multiple create/destroy.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876675 13f79535-47bb-0310-9956-ffa450edef68

5 years agocore, h2: common ap_parse_request_line() and ap_check_request_header() code.
Yann Ylavic [Fri, 17 Apr 2020 16:47:42 +0000 (16:47 +0000)] 
core, h2: common ap_parse_request_line() and ap_check_request_header() code.

Extract parsing/validation code from read_request_line() and ap_read_request()
into ap_parse_request_line() and ap_check_request_header() helpers such that
mod_http2 can validate its HTTP/1 request with the same/configured policy.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876674 13f79535-47bb-0310-9956-ffa450edef68

5 years agocore, h2: send EOR for early HTTP request failure.
Yann Ylavic [Fri, 17 Apr 2020 13:07:46 +0000 (13:07 +0000)] 
core, h2: send EOR for early HTTP request failure.

The core output filters depend on EOR being sent at some point for correct
accounting of setaside limits and lifetime.

Rework ap_read_request() early failure (including in post_read_request() hooks)
so that it always sends the EOR after ap_die().

Apply the same scheme in h2_request_create_rec() which is the HTTP/2 to HTTP/1
counterpart.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876664 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* server/mpm/prefork/prefork.c (prefork_pre_config): Use pconf as
Joe Orton [Thu, 16 Apr 2020 18:22:43 +0000 (18:22 +0000)] 
* server/mpm/prefork/prefork.c (prefork_pre_config): Use pconf as
  passed to the hook with ap_fatal_signal_child_setup, since
  prefork.c's pconf "global" is not set until the (later) open_logs
  hook, and if built as a DSO it may be reset inbetween.

* server/mpm/motorz/motorz.c (motorz_pre_config): Likewise.

[event and worker do not appear to have the same issue]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876626 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAllow failures for the gcc9 build since the repo seems to have broken deps.
Joe Orton [Thu, 16 Apr 2020 18:00:17 +0000 (18:00 +0000)] 
Allow failures for the gcc9 build since the repo seems to have broken deps.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876623 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/core/mod_watchdog.c (wd_worker): Fix crashes snuck into
Joe Orton [Thu, 16 Apr 2020 17:55:48 +0000 (17:55 +0000)] 
* modules/core/mod_watchdog.c (wd_worker): Fix crashes snuck into
  r1876599 where a destroyed pool was reused.  Rename the "ctx"
  variable to reflect its purpose.  Also tweak the pool tags.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876619 13f79535-47bb-0310-9956-ffa450edef68

5 years ago *) mod_http2: Fixed regression that no longer set H2_STREAM_ID and H2_STREAM_TAG.
Stefan Eissing [Thu, 16 Apr 2020 17:15:40 +0000 (17:15 +0000)] 
  *) mod_http2: Fixed regression that no longer set H2_STREAM_ID and H2_STREAM_TAG.
     PR64330

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876616 13f79535-47bb-0310-9956-ffa450edef68

5 years ago* modules/aaa/mod_authnz_ldap.c (build_request_config): Fix typo.
Joe Orton [Thu, 16 Apr 2020 15:07:34 +0000 (15:07 +0000)] 
* modules/aaa/mod_authnz_ldap.c (build_request_config): Fix typo.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876609 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAdd missing pool tags to help debugging.
Yann Ylavic [Thu, 16 Apr 2020 12:32:33 +0000 (12:32 +0000)] 
Add missing pool tags to help debugging.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAxe remainder from r1875947.
Yann Ylavic [Thu, 16 Apr 2020 11:04:03 +0000 (11:04 +0000)] 
Axe remainder from r1875947.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876595 13f79535-47bb-0310-9956-ffa450edef68

5 years agoCredits where it's due.
Yann Ylavic [Thu, 16 Apr 2020 10:42:17 +0000 (10:42 +0000)] 
Credits where it's due.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876594 13f79535-47bb-0310-9956-ffa450edef68

5 years agoAdd forgotten entries.
Jean-Frederic Clere [Thu, 16 Apr 2020 09:10:45 +0000 (09:10 +0000)] 
Add forgotten entries.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876591 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_{ssl,md}: init_stapling_status hooks should return an int.
Yann Ylavic [Wed, 15 Apr 2020 12:45:42 +0000 (12:45 +0000)] 
mod_{ssl,md}: init_stapling_status hooks should return an int.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876549 13f79535-47bb-0310-9956-ffa450edef68

5 years agomod_ssl: Fix memory leak in stapling code. PR63687.
Yann Ylavic [Wed, 15 Apr 2020 12:25:27 +0000 (12:25 +0000)] 
mod_ssl: Fix memory leak in stapling code. PR63687.

Free issuer's X509 in ssl_stapling_init_cert()'s early return paths.

Submitted by: icing

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876548 13f79535-47bb-0310-9956-ffa450edef68