Skip to content

Fix async redirect handling regression from FOLLOW_REDIRECTS default#1322

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

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

Conversation

@cursor

@cursor cursor Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

Commit #1278 introduced FOLLOW_REDIRECTS, defaulting redirect following to true for all request modes. That regressed async connectors such as Slack Analytics, which rely on the proxy intercepting 3xx responses and manually fetching the Location URL. With automatic redirect following enabled, the HTTP client follows redirects before the async redirect-handling block runs, causing async exports to fail or return incorrect data.

ChatGPT Enterprise was protected because its connector spec explicitly sets FOLLOW_REDIRECTS=FALSE, but Slack Analytics (enable_async_processing: true, no FOLLOW_REDIRECTS env var) and other custom async connectors were broken.

Root cause

ApiDataRequestHandler changed from .setFollowRedirects(!processingContext.getAsync()) to:

config.getConfigPropertyAsOptional(FOLLOW_REDIRECTS).map(Boolean::parseBoolean).orElse(true)

This made sync-mode behavior the default for async requests unless the env var was explicitly set.

Fix and validation

  • Restore mode-specific default: orElse(!processingContext.getAsync()) — async requests do not follow redirects unless FOLLOW_REDIRECTS is explicitly configured.
  • Update ProxyConfigProperty javadoc to document the mode-specific defaults.
  • Add asyncModeDisablesRedirectFollowingByDefault unit test to lock in the behavior.

Validation: mvn test -pl core -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>
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