Skip to content

fix: emit X-Glean-Include-Experimental header (not X-Glean-Experimental)#101

Merged
travis-hoover-glean merged 1 commit into
mainfrom
fix/x-glean-include-experimental-header
Jul 2, 2026
Merged

fix: emit X-Glean-Include-Experimental header (not X-Glean-Experimental)#101
travis-hoover-glean merged 1 commit into
mainfrom
fix/x-glean-include-experimental-header

Conversation

@travis-hoover-glean

Copy link
Copy Markdown
Contributor

Summary

The XGleanHeadersHook BeforeRequest hook correctly reads the includeExperimental SDK option and the X_GLEAN_INCLUDE_EXPERIMENTAL env var, but sets the wrong header name. It emits X-Glean-Experimental when the backend expects X-Glean-Include-Experimental.

This corrects the HEADER_EXPERIMENTAL constant (and javadoc). Behavior (opt-in, env var precedence) is unchanged. The test references the constant, so it's covered automatically.

Changes

  • src/main/java/.../hooks/XGleanHeadersHook.java — header constant value and javadoc

Verification

  • ./gradlew test --tests "*XGleanHeadersHookTest*" → BUILD SUCCESSFUL

Related

Same bug exists in the TypeScript, Go, and Python SDKs; companion PRs fix each. Env var name was already correct and is unchanged.

The XGleanHeadersHook read the correct includeExperimental option and
X_GLEAN_INCLUDE_EXPERIMENTAL env var but emitted the wrong header name.
The backend expects X-Glean-Include-Experimental. Correct the header
constant (and javadoc); the test consumes the constant so it is covered
automatically.
@travis-hoover-glean travis-hoover-glean marked this pull request as ready for review July 2, 2026 03:43
@travis-hoover-glean travis-hoover-glean requested a review from a team as a code owner July 2, 2026 03:43
@travis-hoover-glean travis-hoover-glean merged commit cdf9731 into main Jul 2, 2026
@travis-hoover-glean travis-hoover-glean deleted the fix/x-glean-include-experimental-header branch July 2, 2026 16:53
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