mod_proxy_html.c

Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Reverse the order of the test... if clang, then use clang, because some clangs also represent as GNUC.

This fixes breaking the macOS builds due to r1864435 under maint-mode

  1. … 1 more file in changeset.
* modules/filters/mod_proxy_html.c, modules/filters/mod_xml2enc.c:

Fix gcc 9 warnings in code attempting to reduce gcc warnings.

(should have used expat...)

mod_xml2enc.c:26:28: warning: "/*" within comment [-Wcomment]

26 | /* libxml2 includes unicode/*.h files which uses C++ comments */

|

mod_proxy_html.c:32:28: warning: "/*" within comment [-Wcomment]

32 | /* libxml2 includes unicode/*.h files which uses C++ comments */

|

  1. … 1 more file in changeset.
Unfortunately -Wcomment can only be influenced

using a diagnostics pragma starting with GCC 4.6.

  1. … 1 more file in changeset.
Follow up to r1864438 and r1864435:

Use the right pragma syntax also in the second file.

Use the right pragma syntax.

Follow-up to r1864435.

  1. … 1 more file in changeset.
The GCC flag "-Wno-error=comment" introduced by r1855446

and r1850745 are only known since GCC 4.2. Since it gets

set unconditionally, this breaks compilation with old GCC

even when not using maintainer mode.

Make the fix for maintainer mode more specific by using

a version dependent pragma in the relevant two C files

only switching off error status for comment warnings.

  1. … 2 more files in changeset.
Save a few cycles.

Use apr_pstrmemdup instead of apr_pstrndup when possible.

Save a few cycles and simlify code.

Use apr_pstrmemdup instead of apr_pstrndup when possible.

Avoid scanning the first 2 bytes when looking for the | delimiter. it is known to be "${".

Avoid comma separated statements, it is not that usual.

mod_proxy_html: Fix variable interpolation and memory allocation failure in ProxyHTMLURLMap.

Proposed by: Ewald Dieterich <ewald mailbox.org>

Reviewed by: ylavic

  1. … 1 more file in changeset.
mod_proxy_html: output filter rework.

Such that it cleans up the buckets while they are consumed and bails out

appropriately on EOS.

mod_proxy_html: don't depend on NUL terminated bucket data.

ap_regexec() wants NUL terminated strings, so use ap_regexec_len() instead.

mod_proxy_html: follow up to r1599012.

To determine whether or not HTML data are lower than 4 bytes, use a retain

buffer rather than assuming that all should be contained in a single bucket

with the next one being EOS (if any).

Fix some style
mod_proxy_html: fix metafix handling of <meta http-equiv> elements

PR#58121

  1. … 1 more file in changeset.
The other half of r1442409: fix mod_proxy_html doctype-handling typos

PR 56457

Save a few bytes in the conf pool when handling 'ProxyHTMLDoctype' directive with a user defined FPI
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
  1. … 49 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.
follow up r1599012:

C99 fix

mod_proxy_html: support automatic doctype detection.

PR 56285

Patch by Micha Lenk, adapted by niq

  1. … 2 more files in changeset.
mod_proxy_html: skip documents < 4 bytes

PR 56286

Micha Lenk

  1. … 1 more file in changeset.
Do not perform a p+= 7 that could go past the end of the buffer in case we find a 'content' without a corresponding '='.

Should we need to deal with this case, a new search should be performed to find the real starting position of another potential 'content=' pattern.

Do not scan past the end of the buffer.

If no terminating delimiter is found, just leave things as it is

Do not delete the wrong data from HTML code when a "http-equiv" meta tag specifies a Content-Type behind any other "http-equiv" meta tag.

PR 56287 [Micha Lenk <micha lenk info>]

  1. … 1 more file in changeset.
make the "ProxyHTMLFixups" options case insensitive in mod_proxy_html

PR 54420 reported by Tianyin Xu [tixu cs ucsd edu]

Remove useless tests.

Turn

if (*x && apr_isspace(*x))

into

if (apr_isspace(*x))

  1. … 9 more files in changeset.
mod_proxy_html: bugfixes and introduce HTML5 doctype

  1. … 1 more file in changeset.
fix various property issues

  1. … 54 more files in changeset.