Skip to content
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

Older devices are sending "gpc": 1 and this can't marshal. #4070

Merged
merged 8 commits into from
Dec 13, 2024
14 changes: 14 additions & 0 deletions openrtb_ext/request_wrapper_test.go
scr-oath marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,20 @@ func TestRegExtUnmarshal(t *testing.T) {
expectGPC: ptrutil.ToPtr("some_value"),
expectError: false,
},
{
name: `valid_gpc_json "1"`,
scr-oath marked this conversation as resolved.
Show resolved Hide resolved
regExt: &RegExt{},
extJson: json.RawMessage(`{"gpc": "1"}`),
expectGPC: ptrutil.ToPtr("1"),
expectError: false,
},
{
name: `valid_gpc_json 1`,
regExt: &RegExt{},
extJson: json.RawMessage(`{"gpc": 1}`),
expectGPC: ptrutil.ToPtr("1"),
expectError: false,
},
{
name: "malformed_gpc_json",
regExt: &RegExt{},
Expand Down
Loading