Skip to content

Commit

Permalink
Added bid ID generation code
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-jaydeep-mohite committed Jun 17, 2024
1 parent b17a465 commit e3e0ab1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions adapters/vastbidder/vastbidder.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,19 @@ func (a *VASTBidder) MakeBids(internalRequest *openrtb2.BidRequest, externalRequ
}

// Bid.ID is made empty as its generated randomly in etree and fastXML
etreeResp := etreeParserResp
if etreeResp != nil {
for _, bid := range etreeResp.Bids {
if etreeParserResp != nil {
for _, bid := range etreeParserResp.Bids {
bid.Bid.ID = ""
}
}
etrrResp, _ := jsonutil.Marshal(etreeResp)
etrrResp, _ := jsonutil.Marshal(etreeParserResp)

// Bid.ID is made empty for comparision above, creating it again
if etreeParserResp != nil {
for _, bid := range etreeParserResp.Bids {
bid.Bid.ID = generateRandomID()
}
}

isVASTMismatch := false
if string(xmlResp) != string(etrrResp) {
Expand Down

0 comments on commit e3e0ab1

Please sign in to comment.