mod_proxy_ftp.c

Checkout Tools
  • last updated 8 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
trap bad FTP responses

PR62989: DOCTYPE tags in server-generated HTML.

Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>

  1. … 11 more files in changeset.
Fix pool concurrency problems

Create a subpool of the connection pool for worker scoped DNS resolutions.

This is needed to avoid race conditions in using the connection pool by multiple

threads during ramp up.

Recheck after obtaining the lock if we still need to do things or if they

were already done by another thread while we were waiting on the lock.

* modules/proxy/proxy_util.c: Create a subpool of the connection pool for worker

scoped DNS resolutions and use it.

* modules/proxy/mod_proxy.h: Define AP_VOLATILIZE_T and add dns_pool to

struct proxy_conn_pool.

* modules/proxy/mod_proxy_ftp.c: Use dns_pool and consider that

worker->cp->addr is volatile in this location of the code.

PR: 63503

  1. … 4 more files in changeset.
* Lock the worker, not the balancer. We even do not know if we have a balancer
lognos

  1. … 1 more file in changeset.
remove request details from error documents

  1. … 4 more files in changeset.
Follow up to r1859371: extend to other ap_proxy_connection_create[_ex]() users.

This function now now handles SSL reuse as well as the "proxy-request-hostname"

note (SNI), so let's also call it unconditionnaly in all proxy modules.

On the mod_ssl side, since this note has the lifetime of the connection, don't

reset/unset it during handshake (ssl_io_filter_handshake).

  1. … 6 more files in changeset.
Make proxy modules compile if APR_HAS_THREADS is not defined.

  1. … 3 more files in changeset.
revert of r808895 somehow missed mod_proxy_ftp

r808895 added `ServerTokens OFF` so some modules were

switched from ap_get_server_banner() to

ap_get_server_description() so they would never be empty.

But ap_get_server_description() is documnented as being for local

use only, so it was not really a suitable replacement much less

w/ `ServerTokens OFF` subsequently taken out.

Save some cycle.

There is no need to copy, strchr, strcmp and modify a string which is only used for TRACE2 logging.

Note that the code that looks similar a few lines below can not be optimized the same way because it is also returned in 'pmessage'.

Delay some memory allocation.

If this handler will not handle the request, no need to waste bytes in the request pool.

Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
  1. … 49 more files in changeset.
mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,

allowing per backend TLS configuration.

  1. … 19 more files in changeset.
Added many log numbers to log statements that

had none.

Those were not detected by the coccinelle script.

  1. … 34 more files in changeset.
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).

  1. … 32 more files in changeset.
Revert r1715789: will re-commit without spurious functional changes.

  1. … 32 more files in changeset.
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).

[Reverted by r1715869]

  1. … 32 more files in changeset.
Fix some spurious ident spotted by sparse
Fix indent.
Turn some APR_BUCKET_REMOVE(e)+apr_bucket_destroy(e) into the equivalent apr_bucket_delete(e) to reduce code verbosity

  1. … 4 more files in changeset.
Remove some 'register' in variable declaration.
  1. … 2 more files in changeset.
Strip useless apr_brigade_cleanup() calls.
  1. … 6 more files in changeset.
Avoid sending back uninitialized memory, use 'ftpmessage' in order to have something meaningful instead.

Save 8k of stack by the same time.

mod_proxy: Ensure network errors detected by the proxy are returned as

504 Gateway Timout as opposed to 502 Bad Gateway, in order to be

compliant with RFC2616 14.9.4 Cache Revalidation and Reload Controls.

  1. … 3 more files in changeset.
* modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler): Remove

unnecessary APLOGNO() for trace logging per dev@ discussion.

* modules/proxy/mod_proxy_ftp.c: Fill in APLOGNO.

  1. … 1 more file in changeset.
* modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler): Simplify EPSV

address handling to avoid overhead of unnecessary

binary->text->binary conversion, and ensuring the socket family

really matches the address used.

CVE-2012-3499 and CVE-2012-4558

Be sure to escape potential troubled strings

  1. … 4 more files in changeset.
*) mod_proxy_ftp: Fix segfaults on IPv4 requests to hosts with DNS AAAA records.

PR 40841. [Andrew Rucker Jones <arjones simultan dyndns org>,

<ast domdv de>, Jim Jagielski]

  1. … 1 more file in changeset.