Skip to content

OpenX Bid Adapter: always gzip bid requests - #109

Merged
Ivan Gusev (ivan-gusev) merged 1 commit into
masterfrom
agent/openx-endpoint-compression
Oct 9, 2026
Merged

Ivan Gusev (ivan-gusev) merged 1 commit into
masterfrom
agent/openx-endpoint-compression

Conversation

@ivan-gusev

@ivan-gusev Ivan Gusev (ivan-gusev) commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

Sets options.endpointCompression = true in buildRequests (modules/openxBidAdapter.js), so Prebid core gzips the ORTB request body and adds gzip=1 to the endpoint URL. Core sends the request uncompressed in debug mode or when the browser has no CompressionStream.

Of the two approaches other adapters use, this follows the always-on one (improvedigital, adagio, ocm). It doesn't add a configurable getGzipSetting() helper like criteo, pubmatic and triplelift, because compression is meant to be always on and that helper is duplicated in each adapter that has it.

Tests

  • New unit test checks request.options is { endpointCompression: true }.
  • gulp test-only --file test/spec/modules/openxBidAdapter_spec.js: 107 passed
  • gulp lint --nolintfix on changed files: clean

Notes

  • rtb.openx.net/openrtbb/prebidjs, and any openxOrtbUrl override, must accept gzipped bodies with ?gzip=1.

Set options.endpointCompression = true in buildRequests so Prebid core
gzips the ORTB body and appends gzip=1 to the request URL. Core falls
back to an uncompressed request in debug mode or when CompressionStream
is unavailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JzCU8N66YTbEwax3VkNvQr
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@ivan-gusev
Ivan Gusev (ivan-gusev) merged commit 96226e5 into master Oct 9, 2026
114 of 116 checks passed
@ivan-gusev
Ivan Gusev (ivan-gusev) deleted the agent/openx-endpoint-compression branch October 9, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant