-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Vast logic #1271
Update Vast logic #1271
Conversation
# Conflicts: # src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json
final String impressionUrl = "<![CDATA[" + vastUrlTracking + "]]>"; | ||
final String openTag = "<Impression>"; | ||
final String impressionTag = "<Impression><![CDATA[" + vastUrlTracking + "]]></Impression>"; | ||
final String inlineCloseTag = IN_LINE_TAG.replace("<", "</"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a constant actually, there is no need to create a new string for each invocation.
} | ||
|
||
private String appendTrackingUrlForWrapperType(String vastXml, String vastUrlTracking, Integer wrapperTagIndex) { | ||
final String impressionTag = "<Impression><![CDATA[" + vastUrlTracking + "]]></Impression>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impression tag construction looks similar across this and previous methods and is a good candidate for a separate method.
|
||
return vastXml.replaceFirst(closeTag, closeTag + openTag + impressionUrl + closeTag); | ||
return vastXml.replaceFirst(WRAPPER_TAG, WRAPPER_TAG + impressionTag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be technically correct but still causes itching somehow. Can we insert impression tag in wrapper after the last present impression to be in line with how it is done in inline object?
# Conflicts: # src/main/java/org/prebid/server/auction/BidResponseCreator.java # src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json
ff3c76a
to
3be15d1
Compare
@@ -163,6 +163,7 @@ private static int validateTruncateAttrChars(int truncateAttrChars) { | |||
AuctionContext auctionContext, | |||
BidRequestCacheInfo cacheInfo, | |||
Map<String, MultiBidConfig> bidderToMultiBids, | |||
List<String> debugWarnings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter doesn't look necessary - debugWarnings
could be obtained from auctionContext
return appendTrackingUrl(vastXml, vastUrlTracking, false); | ||
} | ||
metrics.updateAdapterRequestErrorMetric(bidder, MetricName.badserverresponse); | ||
if (debugWarnings != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see debugWarnings
shouldn't be null
ever.
No description provided.