diff --git a/adapters/beachfront/beachfront.go b/adapters/beachfront/beachfront.go
index 6eba9923e64..7f4658d442c 100644
--- a/adapters/beachfront/beachfront.go
+++ b/adapters/beachfront/beachfront.go
@@ -449,8 +449,9 @@ func getVideoRequests(request *openrtb2.BidRequest) ([]beachfrontVideoRequest, [
var chunks = strings.Split(strings.Trim(bfReqs[i].Request.App.Bundle, "_"), ".")
if len(chunks) > 1 {
- bfReqs[i].Request.App.Domain =
- fmt.Sprintf("%s.%s", chunks[len(chunks)-(len(chunks)-1)], chunks[0])
+ appCopy := *bfReqs[i].Request.App
+ appCopy.Domain = fmt.Sprintf("%s.%s", chunks[len(chunks)-(len(chunks)-1)], chunks[0])
+ bfReqs[i].Request.App = &appCopy
}
}
}
diff --git a/adapters/beachfront/beachfronttest/exemplary/adm-video-app.json b/adapters/beachfront/beachfronttest/exemplary/adm-video-app.json
new file mode 100644
index 00000000000..0734a212c61
--- /dev/null
+++ b/adapters/beachfront/beachfronttest/exemplary/adm-video-app.json
@@ -0,0 +1,124 @@
+{
+ "mockBidRequest": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "id": "video1",
+ "ext": {
+ "bidder": {
+ "bidfloor": 3.01,
+ "appId": "videoAppId1"
+ }
+ },
+ "video": {
+ "mimes": [
+ "video/mp4"
+ ],
+ "context": "instream",
+ "w": 300,
+ "h": 250
+ }
+ }
+ ],
+ "app": {
+ "bundle": "com.domain.some"
+ },
+ "device":{
+ "ip":"192.168.168.168"
+ }
+ },
+
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "https://qa.beachrtb.com/bid.json?exchange_id=videoAppId1",
+ "body": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "video": {
+ "w": 300,
+ "h": 250,
+ "mimes": [
+ "video/mp4"
+ ]
+ },
+ "bidfloor": 3.01,
+ "id": "video1",
+ "secure": 0
+ }
+ ],
+ "app": {
+ "bundle": "com.domain.some",
+ "domain": "domain.com"
+ },
+ "cur": [
+ "USD"
+ ],
+ "device":{
+ "devicetype": 1,
+ "ip":"192.168.168.168"
+ }
+ }
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "adm-video",
+ "seatBid": [
+ {
+ "bid": [
+ {
+ "id": "5fd7c8a6ff2f1f0d42ee6427",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ }
+ ],
+ "seat": "bfio-s-1"
+ }
+ ]
+ }
+ }
+ }
+ ],
+
+ "expectedBidResponses": [
+ {
+ "currency": "USD",
+ "bids": [
+ {
+ "bid": {
+ "id": "video1AdmVideo",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/beachfront/beachfronttest/supplemental/adm-video-app-alphanum-bundle.json b/adapters/beachfront/beachfronttest/supplemental/adm-video-app-alphanum-bundle.json
new file mode 100644
index 00000000000..0e3a32d5437
--- /dev/null
+++ b/adapters/beachfront/beachfronttest/supplemental/adm-video-app-alphanum-bundle.json
@@ -0,0 +1,123 @@
+{
+ "mockBidRequest": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "id": "video1",
+ "ext": {
+ "bidder": {
+ "bidfloor": 3.01,
+ "appId": "videoAppId1"
+ }
+ },
+ "video": {
+ "mimes": [
+ "video/mp4"
+ ],
+ "context": "instream",
+ "w": 300,
+ "h": 250
+ }
+ }
+ ],
+ "app": {
+ "bundle": "id1234567890"
+ },
+ "device":{
+ "ip":"192.168.168.168"
+ }
+ },
+
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "https://qa.beachrtb.com/bid.json?exchange_id=videoAppId1",
+ "body": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "video": {
+ "w": 300,
+ "h": 250,
+ "mimes": [
+ "video/mp4"
+ ]
+ },
+ "bidfloor": 3.01,
+ "id": "video1",
+ "secure": 0
+ }
+ ],
+ "app": {
+ "bundle": "id1234567890"
+ },
+ "cur": [
+ "USD"
+ ],
+ "device":{
+ "devicetype": 1,
+ "ip":"192.168.168.168"
+ }
+ }
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "adm-video",
+ "seatBid": [
+ {
+ "bid": [
+ {
+ "id": "5fd7c8a6ff2f1f0d42ee6427",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ }
+ ],
+ "seat": "bfio-s-1"
+ }
+ ]
+ }
+ }
+ }
+ ],
+
+ "expectedBidResponses": [
+ {
+ "currency": "USD",
+ "bids": [
+ {
+ "bid": {
+ "id": "video1AdmVideo",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/beachfront/beachfronttest/supplemental/adm-video-app-malformed-bundle.json b/adapters/beachfront/beachfronttest/supplemental/adm-video-app-malformed-bundle.json
new file mode 100644
index 00000000000..8327426ca0f
--- /dev/null
+++ b/adapters/beachfront/beachfronttest/supplemental/adm-video-app-malformed-bundle.json
@@ -0,0 +1,124 @@
+{
+ "mockBidRequest": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "id": "video1",
+ "ext": {
+ "bidder": {
+ "bidfloor": 3.01,
+ "appId": "videoAppId1"
+ }
+ },
+ "video": {
+ "mimes": [
+ "video/mp4"
+ ],
+ "context": "instream",
+ "w": 300,
+ "h": 250
+ }
+ }
+ ],
+ "app": {
+ "bundle": "some.domain.us/some/page.html"
+ },
+ "device":{
+ "ip":"192.168.168.168"
+ }
+ },
+
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "https://qa.beachrtb.com/bid.json?exchange_id=videoAppId1",
+ "body": {
+ "id": "adm-video",
+ "imp": [
+ {
+ "video": {
+ "w": 300,
+ "h": 250,
+ "mimes": [
+ "video/mp4"
+ ]
+ },
+ "bidfloor": 3.01,
+ "id": "video1",
+ "secure": 0
+ }
+ ],
+ "app": {
+ "bundle": "some.domain.us/some/page.html",
+ "domain": "domain.some"
+ },
+ "cur": [
+ "USD"
+ ],
+ "device":{
+ "devicetype": 1,
+ "ip":"192.168.168.168"
+ }
+ }
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "adm-video",
+ "seatBid": [
+ {
+ "bid": [
+ {
+ "id": "5fd7c8a6ff2f1f0d42ee6427",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ }
+ ],
+ "seat": "bfio-s-1"
+ }
+ ]
+ }
+ }
+ }
+ ],
+
+ "expectedBidResponses": [
+ {
+ "currency": "USD",
+ "bids": [
+ {
+ "bid": {
+ "id": "video1AdmVideo",
+ "impid": "video1",
+ "price": 20,
+ "adm": "http://example.com/vast.xml",
+ "adid": "1088",
+ "adomain": [
+ "beachfront.io"
+ ],
+ "cid": "277",
+ "crid": "532",
+ "w": 300,
+ "h": 250,
+ "ext": {
+ "duration": 30
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}