From 9fb6351ac4a5706275c16ca75a6c0a2a7042270c Mon Sep 17 00:00:00 2001 From: Ad Generation Date: Mon, 5 Oct 2020 16:57:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=86=E3=82=B9=E3=83=88=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AEexternalRequest=E3=81=AE?= =?UTF-8?q?=E5=80=A4=E3=82=92=E4=BF=AE=E6=AD=A3=20change:=20adapter?= =?UTF-8?q?=E3=81=AEversion=E6=83=85=E5=A0=B1=E3=82=92=E3=81=82=E3=81=92?= =?UTF-8?q?=E3=82=8B=20=E3=81=93=E3=81=AE=E3=82=B3=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AF=E3=81=82=E3=81=A8=E3=81=8B=E3=82=89rebase?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adapters/adgeneration/adgeneration.go | 4 ++-- .../adgenerationtest/exemplary/single-banner.json | 2 +- .../adgenerationtest/supplemental/204-bid-response.json | 2 +- .../adgenerationtest/supplemental/400-bid-response.json | 2 +- .../adgenerationtest/supplemental/no-bid-response.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/adapters/adgeneration/adgeneration.go b/adapters/adgeneration/adgeneration.go index baf5dbf8a1b..08a7be08a62 100644 --- a/adapters/adgeneration/adgeneration.go +++ b/adapters/adgeneration/adgeneration.go @@ -54,7 +54,7 @@ func (adg *AdgenerationAdapter) MakeRequests(request *openrtb.BidRequest, reqInf headers := http.Header{} headers.Add("Content-Type", "application/json;charset=utf-8") headers.Add("Accept", "application/json") - if len(request.Device.UA) > 0 { + if request.Device != nil && len(request.Device.UA) > 0 { headers.Add("User-Agent", request.Device.UA) } @@ -261,7 +261,7 @@ func removeWrapper(ad string) string { func NewAdgenerationAdapter(endpoint string) *AdgenerationAdapter { return &AdgenerationAdapter{ endpoint, - "1.0.1", + "1.0.2", "JPY", } } diff --git a/adapters/adgeneration/adgenerationtest/exemplary/single-banner.json b/adapters/adgeneration/adgenerationtest/exemplary/single-banner.json index 10bf1c4a0c0..5e8405686f2 100644 --- a/adapters/adgeneration/adgenerationtest/exemplary/single-banner.json +++ b/adapters/adgeneration/adgenerationtest/exemplary/single-banner.json @@ -52,7 +52,7 @@ "tmax": 500 }, "expectedRequest":{ - "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.1¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&size=300%C3%97250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", + "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.2¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&sizes=300x250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", "headers": { "Accept": [ "application/json" diff --git a/adapters/adgeneration/adgenerationtest/supplemental/204-bid-response.json b/adapters/adgeneration/adgenerationtest/supplemental/204-bid-response.json index bc469a1e3a9..d94b6d31dc8 100644 --- a/adapters/adgeneration/adgenerationtest/supplemental/204-bid-response.json +++ b/adapters/adgeneration/adgenerationtest/supplemental/204-bid-response.json @@ -52,7 +52,7 @@ "tmax": 500 }, "expectedRequest":{ - "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.1¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&size=300%C3%97250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", + "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.2¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&sizes=300x250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", "headers": { "Accept": [ "application/json" diff --git a/adapters/adgeneration/adgenerationtest/supplemental/400-bid-response.json b/adapters/adgeneration/adgenerationtest/supplemental/400-bid-response.json index 6ac92d9a38b..ca940d9d43c 100644 --- a/adapters/adgeneration/adgenerationtest/supplemental/400-bid-response.json +++ b/adapters/adgeneration/adgenerationtest/supplemental/400-bid-response.json @@ -52,7 +52,7 @@ "tmax": 500 }, "expectedRequest":{ - "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.1¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&size=300%C3%97250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", + "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.2¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&sizes=300x250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", "headers": { "Accept": [ "application/json" diff --git a/adapters/adgeneration/adgenerationtest/supplemental/no-bid-response.json b/adapters/adgeneration/adgenerationtest/supplemental/no-bid-response.json index a0abb66d039..cc47a694360 100644 --- a/adapters/adgeneration/adgenerationtest/supplemental/no-bid-response.json +++ b/adapters/adgeneration/adgenerationtest/supplemental/no-bid-response.json @@ -52,7 +52,7 @@ "tmax": 500 }, "expectedRequest":{ - "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.1¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&size=300%C3%97250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", + "uri": "https://d.socdm.com/adsv/v1?adapterver=1.0.2¤cy=JPY&hb=true&id=58278&posall=SSPLOC&sdkname=prebidserver&sdktype=0&sizes=300x250&t=json3&tp=http%3A%2F%2Fexample.com%2Ftest.html", "headers": { "Accept": [ "application/json"