]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Merge r1934975 from trunk:
authorJoe Orton <jorton@apache.org>
Thu, 4 Jun 2026 11:22:27 +0000 (11:22 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 4 Jun 2026 11:22:27 +0000 (11:22 +0000)
commitd62fc375281486c6036b007ac349b25d4e6edb4a
tree6ec46a9771378c37a962543b00d7253d33a42b74
parent7bfe9266c21c646d1e5bc010465e707b41425e8b
Merge r1934975 from trunk:

mod_proxy_html: Simplify to use the ap_varbuf API.

* modules/filters/mod_proxy_html.c: Include util_varbuf.h.
  (saxctxt): Replace buf/offset/avail members with struct ap_varbuf vb.
  (DEFAULT_BUFSZ): New macro.
  (normalise): Take struct ap_varbuf * parameter instead of char *.
  (preserve, pappend): Remove functions, replaced by ap_varbuf_grow
  and ap_varbuf_strmemcat respectively.
  (dump_content): Use ap_varbuf for regex substitutions via
  ap_varbuf_regsub, avoiding manual buffer resizing with
  preserve/memmove/memcpy.  Use a temporary ap_varbuf for building
  regex replacement results.
  (pcharacters, pcomment): Use ap_varbuf_strmemcat and ap_varbuf_strcat
  in place of pappend.
  (pendElement): Check vb.strlen instead of offset.
  (pstartElement): Use ap_varbuf for attribute URL rewriting with the
  same ap_varbuf_regsub approach.  Use a temporary ap_varbuf for
  regex replacements.
  (proxy_html_filter): Initialize the ap_varbuf with a clamped bufsz.
  (proxy_html_merge): Use DEFAULT_BUFSZ macro.

Assisted-by: Claude Opus 4.6 (claude-opus-4-6)
Reviewed by: covener, jfclere, jorton

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934977 13f79535-47bb-0310-9956-ffa450edef68
modules/filters/mod_proxy_html.c