Skip to content

Commit 2db652e

Browse files
committed
PR fix
1 parent 00613ef commit 2db652e

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/main/java/org/prebid/server/bidder/yandex/YandexBidder.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private static Imp modifyImp(Imp imp) {
117117
throw new PreBidException("Imp #%s must contain at least one valid format (banner, video, or native)"
118118
.formatted(imp.getId()));
119119
}
120-
120+
121121
return imp.toBuilder()
122122
.displaymanager(DISPLAY_MANAGER)
123123
.displaymanagerver(DISPLAY_MANAGER_VERSION)
@@ -131,7 +131,7 @@ private static Banner modifyBanner(Banner banner) {
131131
if (banner == null) {
132132
return null;
133133
}
134-
134+
135135
final Integer weight = banner.getW();
136136
final Integer height = banner.getH();
137137
final List<Format> format = banner.getFormat();
@@ -149,7 +149,7 @@ private static Video modifyVideo(Video video) {
149149
if (video == null) {
150150
return null;
151151
}
152-
152+
153153
final Integer width = video.getW();
154154
final Integer height = video.getH();
155155
if (width == null || height == null || width == 0 || height == 0) {
@@ -163,9 +163,6 @@ private static Video modifyVideo(Video video) {
163163
if (video.getMaxduration() == null || video.getMaxduration() == 0) {
164164
videoBuilder.maxduration(120);
165165
}
166-
if (CollectionUtils.isEmpty(video.getMimes())) {
167-
videoBuilder.mimes(Collections.singletonList("video/mp4"));
168-
}
169166
if (CollectionUtils.isEmpty(video.getProtocols())) {
170167
videoBuilder.protocols(Collections.singletonList(3));
171168
}
@@ -208,7 +205,7 @@ private static MultiMap headers(BidRequest bidRequest) {
208205
final MultiMap headers = HttpUtil.headers();
209206

210207
headers.add(HttpUtil.X_OPENRTB_VERSION_HEADER, "2.5");
211-
HttpUtil.addHeaderIfValueIsNotEmpty(headers, "Referer", getReferer(bidRequest));
208+
HttpUtil.addHeaderIfValueIsNotEmpty(headers, HttpUtil.REFERER_HEADER, getReferer(bidRequest));
212209

213210
final Device device = bidRequest.getDevice();
214211
if (device != null) {

src/main/resources/bidder-config/yandex.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ adapters:
1313
usersync:
1414
cookie-family-name: yandex
1515
redirect:
16-
url: https://an.yandex.ru/mapuid/yandex/?ssp-id=10500&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&location={{redirect_url}}
16+
url: https://yandex.ru/an/mapuid/yandex/?ssp-id=10500&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&location={{redirect_url}}
1717
support-cors: false
1818
uid-macro: '{YANDEXUID}'

src/test/java/org/prebid/server/bidder/yandex/YandexBidderTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ public void makeHttpRequestsShouldReturnErrorWhenBannerHasNoFormats() {
182182
final BidRequest bidRequest = givenBidRequest(
183183
impBuilder -> impBuilder.id("blockA").banner(Banner.builder().build()),
184184
identity());
185-
186185
// when
187186
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest);
188187

@@ -260,8 +259,8 @@ public void makeHttpRequestsShouldModifyVideoParameters() {
260259
.extracting(HttpRequest::getPayload)
261260
.flatExtracting(BidRequest::getImp)
262261
.extracting(Imp::getVideo)
263-
.extracting(Video::getMinduration, Video::getMaxduration, Video::getMimes, Video::getProtocols)
264-
.containsOnly(tuple(1, 120, singletonList("video/mp4"), singletonList(3)));
262+
.extracting(Video::getMinduration, Video::getMaxduration, Video::getProtocols)
263+
.containsOnly(tuple(1, 120, singletonList(3)));
265264
}
266265

267266
@Test

0 commit comments

Comments
 (0)