Skip to content

Fix async redirect handling regression from FOLLOW_REDIRECTS default#1317

Closed
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/critical-bug-fixes-63ce
Closed

Fix async redirect handling regression from FOLLOW_REDIRECTS default#1317
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/critical-bug-fixes-63ce

Conversation

@cursor

@cursor cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Restores async-mode redirect interception behavior that was accidentally regressed in #1278.

Fixes

  • Async connectors (e.g. Slack Analytics, ChatGPT Enterprise) that rely on intercepting 3xx responses when FOLLOW_REDIRECTS is not configured

Change implications

  • dependencies added/changed? no
  • something important to note in future release notes?

Bug and impact

Commit #1278 (Added property) changed ApiDataRequestHandler to default FOLLOW_REDIRECTS to true for all requests, replacing the prior behavior of setFollowRedirects(!processingContext.getAsync()). Async connectors such as Slack Analytics depend on the proxy intercepting 3xx responses and manually fetching from the Location URL (with HTTPS validation). With auto-follow enabled, that interception block is bypassed, breaking async data collection for connectors that do not have an explicit FOLLOW_REDIRECTS=FALSE environment variable.

Root cause

#1278 introduced a configurable FOLLOW_REDIRECTS property but changed the default from context-aware (false in async mode) to unconditionally true, removing the async-specific redirect handling added in #1236.

Fix and validation

  • Restore orElse(!processingContext.getAsync()) as the default when FOLLOW_REDIRECTS is unset
  • Update ProxyConfigProperty javadoc to document the async/sync default difference
  • Add asyncModeDisablesRedirectFollowingByDefault unit test
  • Ran mvn test -pl core -am -Dtest=ApiDataRequestHandlerTest#asyncModeDisablesRedirectFollowingByDefault,ApiDataRequestHandlerTest#handleShouldFollowRedirectManuallyInAsyncMode,ApiDataRequestHandlerTest#handleShouldLetHttpClientFollowRedirectInSyncMode — all pass
Open in Web View Automation 

eschultink and others added 3 commits June 18, 2026 13:33
* drop lookup buckets from CallerAccess policy

* style fixes
Commit #1278 changed redirect following to default true unless
FOLLOW_REDIRECTS is explicitly set. That broke async connectors (e.g.
Slack Analytics) which rely on intercepting 3xx responses when
FOLLOW_REDIRECTS is not configured.

Restore the prior default: do not follow redirects in async processing
unless FOLLOW_REDIRECTS is explicitly set. Add a unit test that locks
in the behavior.

Co-authored-by: Erik Schultink <eschultink@users.noreply.github.com>
@eschultink eschultink closed this Jun 26, 2026
@eschultink
eschultink deleted the cursor/critical-bug-fixes-63ce branch June 30, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants