Skip to content

Fix async redirect handling regression from FOLLOW_REDIRECTS default#1316

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/critical-bug-fixes-8571
Draft

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

Conversation

@cursor

@cursor cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

PR #1278 introduced FOLLOW_REDIRECTS but changed the default from "disable redirect following in async mode" to always true when unset. Async connectors such as Slack Analytics rely on the proxy intercepting 3xx responses and fetching the Location URL manually (without forwarding source Authorization headers to pre-signed download URLs). With auto-follow enabled, the HTTP client follows redirects transparently—often with auth headers attached—so the manual redirect block never runs and async imports fail or return unusable data.

ChatGPT Enterprise is protected by an explicit FOLLOW_REDIRECTS=FALSE in Terraform; Slack Analytics has environment_variables: {} and was exposed.

Root cause

// Before #1278
.setFollowRedirects(!processingContext.getAsync());

// After #1278 (regression)
.orElse(true);

Fix

Restore the prior default: when FOLLOW_REDIRECTS is unset, follow redirects in sync mode and disable them in async mode. Explicit FOLLOW_REDIRECTS still overrides.

Added asyncModeDisablesRedirectFollowingByDefault unit test to lock in the behavior.

Validation

  • mvn test -pl core -Dtest=ApiDataRequestHandlerTest — 28 tests pass

Fixes

Change implications

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>
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