Skip to content

feat: Request and decode gzip-compressed polling responses - #297

Merged
keelerm84 merged 1 commit into
mainfrom
mk/SDK-3598/polling-gzip
Nov 16, 2026
Merged

keelerm84 merged 1 commit into
mainfrom
mk/SDK-3598/polling-gzip

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Flag requests now send Accept-Encoding: gzip, and the SDK decodes gzip-compressed responses. Uncompressed responses still work.

  • GuzzleFeatureRequester sets Guzzle's decode_content to gzip. Guzzle adds the request header and decodes the body with both the curl handler and the stream handler.
  • The optional cache middleware stores the decoded body, so a cached replay and a 304 revalidation both return plain JSON.
  • New WireMock-backed tests cover the request header, a gzip body, a plain body, a cached replay and a 304 revalidation. WireMock compresses plain stubs on its own when the client accepts gzip, so the plain-body stub sets Content-Encoding: identity to keep the bytes uncompressed.
  • The contract-test service declares the polling-gzip capability.

Opened from termag


Note

Overview
The polling HTTP client in GuzzleFeatureRequester now sets Guzzle’s decode_content to gzip, so flag/segment polls advertise Accept-Encoding: gzip and transparently decode gzip response bodies while still handling uncompressed JSON.

The contract test harness advertises a new polling-gzip capability. WireMock-backed integration tests verify the request header, gzip and plain responses, decoded bodies served from cache on replay, and correct behavior after a 304 revalidation with If-None-Match.

Reviewed by Cursor Bugbot for commit 2f84eaa. Bugbot is set up for automated code reviews on this repo. Configure here.

@keelerm84
keelerm84 marked this pull request as ready for review November 13, 2026 21:38
@keelerm84
keelerm84 requested a review from a team as a code owner November 13, 2026 21:38
@cursor cursor Bot added the risk:low label Nov 13, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: low.

Automated risk review (dry run): Low

This PR would be automatically approved.

Why: GuzzleFeatureRequester.php adds a one-line Guzzle decode_content gzip option, with new WireMock coverage in GuzzleFeatureRequesterGzipTest.php and a polling-gzip contract-test capability in TestService.php.

If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

@keelerm84
keelerm84 merged commit a71080c into main Nov 16, 2026
17 checks passed
@keelerm84
keelerm84 deleted the mk/SDK-3598/polling-gzip branch November 16, 2026 16:21
keelerm84 pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[6.13.0](6.12.1...6.13.0)
(2026-11-16)


### Features

* Request and decode gzip-compressed polling responses
([#297](#297))
([a71080c](a71080c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants