You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following endpoint returns incorrect response and response-header when both gdpr and gpp parameters are passed in the request. Request
curl -I --location --request GET 'http://localhost:8001/setuid?bidder=pubmatic&uid=123&gpp_sid=1,2&gpp=DBABMA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA&gdpr=1&gdpr_consent=BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw'
Response-Body
Warning: 'gpp' value will be used over the one found in the deprecated 'gdpr_consent' field.
Response-Header
HTTP/1.1 200 OK
Date: --------
Content-Length: 92
Content-Type: text/plain; charset=utf-8
As per the test case description , if both GPP and GDPR are passed in the request then we should give priority to GPP and throw warning.
However, the actual code calls the 'Write' method on response-writer first and then writes warning on same response-writer (here) if responseFormat "f" is set to "i"
Also, here we are trying to call WriteHeader function after write method code which is not correct/recommended.
Possible Fix
I think we should not throw the warning in response body. If it is required then we can throw warning in response header instead of response body.
Do not allow to proceed if both GDPR and GPP are set and return from here
@guscarreon Can you please check if this is valid bug.
The text was updated successfully, but these errors were encountered:
Following endpoint returns incorrect response and response-header when both gdpr and gpp parameters are passed in the request.
Request
Response-Body
Response-Header
As per the test case description , if both GPP and GDPR are passed in the request then we should give priority to GPP and throw warning.
However, the actual code calls the 'Write' method on response-writer first and then writes warning on same response-writer (here) if responseFormat "f" is set to "i"
Also, here we are trying to call WriteHeader function after write method code which is not correct/recommended.
Possible Fix
@guscarreon Can you please check if this is valid bug.
The text was updated successfully, but these errors were encountered: