Skip to content

Commit

Permalink
There are 2 changes- (#913)
Browse files Browse the repository at this point in the history
lines 53 and 61 - allows the http response from our ad api to set cookies.  This somehow increases fill.

everything else - fixes an issue where "no bid" responses aren't registered with prebid in certain cases, causing auction timeouts.
  • Loading branch information
jstocker76 authored and Matt Kendall committed Jan 17, 2017
1 parent 32fcc76 commit 1f40e96
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/adapters/rhythmone.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ module.exports = function(bidManager, global, loader){
callback(200, "success", response.responseText);
else
callback(-1, "http error "+response.status, response.responseText);
}, false, {method:"GET"});
}, false, {method:"GET", withCredentials: true});
}
else{
loader(url, function(responseText, response){
if(response.status === 200)
callback(200, "success", response.responseText);
else
callback(-1, "http error "+response.status, response.responseText);
}, postData, {method:"POST", contentType: "application/json"});
}, postData, {method:"POST", contentType: "application/json", withCredentials: true});
}
}

Expand Down Expand Up @@ -115,6 +115,7 @@ module.exports = function(bidManager, global, loader){
function noBids(params){
for(var i=0; i<params.bids.length; i++){
if(params.bids[i].success !== 1){
logToConsole("registering nobid for slot "+params.bids[i].placementCode);
var bid = bidfactory.createBid(CONSTANTS.STATUS.NO_BID);
bid.bidderCode = bidderCode;
track(debug, 'hb', 'bidResponse', 0);
Expand Down Expand Up @@ -290,8 +291,6 @@ module.exports = function(bidManager, global, loader){

logToConsole(txt);

var bidCount = 0;

if(code === -1)
track(debug, 'hb', 'rmpReplyFail', msg);
else{
Expand All @@ -316,7 +315,6 @@ module.exports = function(bidManager, global, loader){

track(debug, 'hb', 'bidResponse', 1);
bidManager.addBidResponse(placementCode, pbResponse);
bidCount++;
};

track(debug, 'hb', 'rmpReplySuccess');
Expand All @@ -331,8 +329,7 @@ module.exports = function(bidManager, global, loader){
}

// if no bids are successful, inform prebid
if(bidCount === 0)
noBids(params);
noBids(params);

// when all bids are complete, log a report
track(debug, 'hb', 'bidsComplete');
Expand Down

0 comments on commit 1f40e96

Please sign in to comment.