Skip to content

Reuse prepared cache write on redirected request (#11542)#12558

Merged
ezelkow1 merged 1 commit intoapache:9.2.xfrom
ezelkow1:92x-11542
Oct 14, 2025
Merged

Reuse prepared cache write on redirected request (#11542)#12558
ezelkow1 merged 1 commit intoapache:9.2.xfrom
ezelkow1:92x-11542

Conversation

@ezelkow1
Copy link
Copy Markdown
Member

This reproduces a variant of #9275 where we fail on the cache lookup. If the cache lookup were to succeed, it should also fail on the cache write, so this one test should cover both bugs.

  • Reuse prepared cache write on redirected request

Fixes #9275.

When there is no parent proxy and ATS is following a redirect, it will do a cache lookup on the redirected request. If that lookup results in a cache miss, it will start to prepare a new cache write, which is wrong. The state machine intentionally leaves the write open so we can re-use the connection; this is possible to ascertain from the code and from comments to that effect.

We should only open a new write if we don't already have one when following a redirect.

(cherry picked from commit 875463c)

* Add AuTest to reproduce apache#9275

This reproduces a variant of apache#9275 where we fail on the cache lookup. If
the cache lookup were to succeed, it should also fail on the cache write,
so this one test should cover both bugs.

* Reuse prepared cache write on redirected request

Fixes apache#9275.

When there is no parent proxy and ATS is following a redirect, it will do
a cache lookup on the redirected request. If that lookup results in a cache
miss, it will start to prepare a new cache write, which is wrong. The state
machine intentionally leaves the write open so we can re-use the connection;
this is possible to ascertain from the code and from comments to that effect.

We should only open a new write if we don't already have one when following
a redirect.

(cherry picked from commit 875463c)
@ezelkow1 ezelkow1 added this to the 9.2.12 milestone Oct 13, 2025
@ezelkow1 ezelkow1 requested a review from JosiahWI October 13, 2025 23:04
@ezelkow1 ezelkow1 self-assigned this Oct 13, 2025
@ezelkow1 ezelkow1 added the Backport Marked for backport for an LTS patch release label Oct 13, 2025
@ezelkow1 ezelkow1 moved this from In progress to For Review in 9.2.x Branch and Release Oct 13, 2025
@github-project-automation github-project-automation Bot moved this from For Review to Ready to Merge in 9.2.x Branch and Release Oct 14, 2025
@ezelkow1 ezelkow1 merged commit 980e580 into apache:9.2.x Oct 14, 2025
15 checks passed
@ezelkow1 ezelkow1 deleted the 92x-11542 branch October 14, 2025 14:08
@ezelkow1 ezelkow1 moved this from Ready to Merge to Done for v9.2.x in 9.2.x Branch and Release Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport Marked for backport for an LTS patch release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants