server

Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
* server/util_expr_parse.[ch]: Regenerate after r1869724.

Non terminal cannot have string aliases (only tokens appear in error

messages). %token is used to define tokens, and %nterm non terminals.

The hidden %type (which was only recently documented) is meant for

both tokens and non terminals. Yet

%type <foo> expr "expression"

is actually more or less equivalent to

%nterm <foo> expr

%token <foo> "expression"

which is clearly not the intention of the author here.

* server/util_expr_parse.y: Remove useless string-literal only tokens.

Prefer %nterm to %type to avoid this error.

PR: #72

Submitted by: Akim Demaille <akim.demaille gmail.com>

Revert r1869222, wrong files committed.
  1. … 3 more files in changeset.
mod_proxy_http: follow up to r1869216.

Let's call stream_reqbody() for all rb_methods, no RB_SPOOL_CL special case.

This both simplifies code and allows to keep EOS into the input_brigade until

it's sent, and thus detect whether we already fetched the whole body if/when

proxy_http_handler() re-enters for different balancer members.

[reverted by r1869223]

  1. … 3 more files in changeset.
mod_proxy_http: Fix 100-continue deadlock for spooled request bodies. PR 63855.

Send "100 Continue", if needed, before fetching/blocking on the request body in

spool_reqbody_cl(), otherwise mod_proxy and the client can wait for each other,

leading to a request timeout (408).

While at it, make so that ap_send_interim_response() uses the default status

line if none is set in r->status_line.

  1. … 2 more files in changeset.
Fix a typo in a message.

Reported and fixed by Christian Bartolomäus (bartolin gmx.de)

PR 63806

Merge r1866760 from ^/httpd/apreq/trunk:

parser_multipart: fix NULL pointer dereference in nested multipart

create_multipart_context() can return NULL if the given Content-Type

was not recognized (if there is no "boundary" attribute). This

crashes libapreq2.

This bug was introduced by SVN commit 227276. Prior to this commit,

there was a NULL check, but the commit removed it:

http://svn.apache.org/viewvc/httpd/apreq/trunk/library/parser_multipart.c?r1=227276&r2=227275&pathrev=227276

Submitted by: max

Fix an issue on Windows where <IfFile> looks for a file on a non-existent drive (on a USB key that is not plugged for example)

Issue repported by Heather Lotz <knot22 hotmail.com>

  1. … 1 more file in changeset.
Fix a signed/unsigned comparison that can never match.

-1 is a valid length value (for socket, pipe and cgi buckets for example)

All path I've checked cast the -1 to (apr_size_t) in order for the comparison to work. So do it as well here.

This has been like that in trunk since r708144, about 11 years ago, so I assume that it is not really an issue.

Spotted by gcc 9.1 and -Wextra

Fix a signed/unsigned comparison that can never match.

(+ add a missing space to improve formating)

Spotted by gcc 9.1 and -Wextra

set PCRE_DOTALL by default

Submitted by ylavic

  1. … 2 more files in changeset.
Synch 2.4 and trunk.

Remove an empty line that must have been missed in a backport.

Fix crashes when running with debug APR (APR_POOL_DEBUG),

because all pools have NULL allocators then.

This workaround is probably not very efficient,

but is only used when we do APR_POOL_DEBUG

and efficiency shouldn't be a big concern then.

*) mod_http2/mpm_event: Fixes the behaviour when a HTTP/2 connection has nothing

more to write with streams ongoing (flow control block). The timeout waiting

for the client to send WINODW_UPDATE was incorrectly KeepAliveTimeout and not

Timeout as it should be. Fixes PR 63534. [Yann Ylavic, Stefan Eissing]

  1. … 3 more files in changeset.
* server/main.c (main): Don't create a separate subpool for pcommands

(it had an identical lifetime to the global pool).

After reinstatement of DSO support in APR/APR-util, revert r1837437,

r1837435, r1834553, r1833598, r1833452, r1833383, r1833368.

Undoes the following:

mod_ssl: OpenSSL now initializes fully through APR, use that.

mod_ssl: build with LibreSSL.

LibreSSL seems to be openssl-1.1 API compatible only in version 2.8 (master).

So use that for MODSSL_USE_OPENSSL_PRE_1_1_API instead of 2.7, the two 2.7

compatibility-exceptions are handled explicitely but overall it's simpler.

Regarding CRYPTO_malloc_init vs OPENSSL_malloc_init, libreSSL uses none, the

former used to be a no-op but depends is LIBRESSL_INTERNAL in latest versions,

while the latter has never been (and will never be) defined. So don't call any

with LibreSSL.

Follow up to r1833368: share openssl between modules.

Both libapr[-util], the core PRNG, mod_ssl, mod_crypto and mod_session_crypto

can use the same crypto library (e.g. openssl), use the new APR crypto loading

API so that they can work together and initialize/terminate the lib either once

for all or on demand and reusable by the others.

Follow up to r1833368: apr_crypto_prng_after_fork() now used a PID.

Make use of the new apr_crypto_rng API if available.

  1. … 5 more files in changeset.
* server/scoreboard.c (open_scoreboard): Create the scoreboard in the

parent of pconf rather than creating another global pool.

PR: 43471

* server/util.c: Make "nul" symbol private.

Add an --enable-reduced-exports configure option to link libmain.a

using ld's --whole-archive mode and avoid building exports.c entirely.

This reduces the size of a minimal httpd binary by 18% on Linux/x86_64

(687K to 560K) with no difference to the set of symbols available to

modules.

This option is only appropriate to use if using a shared libapr*

build, hence is non-default.

* configure.in: Add --enable-reduced-exports; disable httpdunit build

if used. Define AP_FORCE_EXPORTS if not enabled (default) in place

of AP_USING_AUTOCONF.

* server/main.c (ap_suck_in_APR): Only build if AP_FORCE_EXPORTS is

defined.

* Makefile.in: Link libmain.la using LIBMAIN_LIB.

* server/Makefile.in: Conditionally build exports.c into libmain.

  1. … 3 more files in changeset.
Be a little more verbose when an error in trigerred in 'ap_set_file_slot()'
Fix a compilation error when GPROF is defined.
Fix use of StateDir directive after r1852982:

* server/core.c (reset_config): Rename from reset_config_defines;

tie core_state_dir to pconf lifetime in this cleanup.

(core_pre_config): Adjust accordingly.

* modules/md/mod_md_config.c (md_config_post_config): Pick up base_dir

from statedir in post-config phase so StateDir can influence it.

* modules/dav/fs/mod_dav_fs.c (dav_fs_create_server_config): Don't

init lockdb_path here. (dav_fs_post_config): New function; set

lockdb_path based on configured statedir.

  1. … 2 more files in changeset.
Provide TEST_CHAR marco in test_char.h

For (internal) usage outside server/util.c, mod_log_forensic for now

and mod_cache (T_HTTP_TOKEN_STOP) in a few...

  1. … 1 more file in changeset.
remove null check

fails in maintainer mode w/ __attribute__(nonnull))

util.c:576:10: error: nonnull parameter 'name' will evaluate to 'true'

on first encounter [-Werror,-Wpointer-bool-conversion]

* r->parsed_uri.path can be NULL in case of the CONNECT method.
* Play safe in case we get no name
* Revert r1855741 which committed other stuff as well.
  1. … 1 more file in changeset.
* Play safe in case we get no name

Reverted by r1855742.

  1. … 1 more file in changeset.
Merge consecutive slashes in the URL by default

opt-out w/ `MergeSlashes OFF`.

  1. … 5 more files in changeset.
MPMs unix: bind the bucket number of each child to its slot number

We need not remember each child's bucket number in SHM for restarts, for the

lifetime of the httpd main process the bucket number can be bound to the slot

number such that: bucket = slot % num_buckets.

This both simplifies the logic and helps children maintenance per bucket in

threaded MPMs, where previously perform_idle_server_maintenance() could create

or kill children processes for the buckets it was not in charge of.

  1. … 2 more files in changeset.