diff options
author | Joe Orton <jorton@apache.org> | 2020-04-23 08:26:26 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2020-04-23 08:26:26 +0000 |
commit | a42f3692b1b975ba05a8e678bafe463707e7e5df (patch) | |
tree | a8a5e9dbdd39f78248454ba5de524a230f3a3436 /os | |
parent | 48aa76e1fce1a670b68a5dc288b2d8d7a96aa237 (diff) | |
download | httpd-a42f3692b1b975ba05a8e678bafe463707e7e5df.tar.gz |
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
Diffstat (limited to 'os')
-rw-r--r-- | os/unix/unixd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os/unix/unixd.c b/os/unix/unixd.c index bde859022b..3b0e695727 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -323,7 +323,7 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr, } /* Let the caller handle slightly more varied return values */ - if (lr->use_specific_errors && ap_accept_error_is_nonfatal(status)) { + if ((lr->flags & AP_LISTEN_SPECIFIC_ERRORS) && ap_accept_error_is_nonfatal(status)) { return status; } |