Repository navigation
OpenX Bid Adapter: always gzip bid requests - #109
Merged
Merged
Conversation
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
|
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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sets
options.endpointCompression = trueinbuildRequests(modules/openxBidAdapter.js), so Prebid core gzips the ORTB request body and addsgzip=1to the endpoint URL. Core sends the request uncompressed in debug mode or when the browser has noCompressionStream.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
request.optionsis{ endpointCompression: true }.gulp test-only --file test/spec/modules/openxBidAdapter_spec.js: 107 passedgulp lint --nolintfixon changed files: cleanNotes
rtb.openx.net/openrtbb/prebidjs, and anyopenxOrtbUrloverride, must accept gzipped bodies with?gzip=1.