prebid-server-java
prebid-server-java copied to clipboard
RemoteFileSyncer does not follow redirects (http status 302 with location header)
Even though we have setup http-client properties to have max-redirects: 3 (ref: GeoLocationConfiguration#createGeoLocationService() ), RemoteFileSyncer is not able to follow redirect.
As of tag 2.15.0, RemoteFileSyncer has this:
private Future<HttpClientResponse> requestData() {
final Promise<HttpClientResponse> promise = Promise.promise();
httpClient.getAbs(downloadUrl, promise::complete).end();
return promise.future();
}
We need to change to this to make it work:
private Future<HttpClientResponse> requestData() {
.........
httpClient.getAbs(downloadUrl, promise::complete).setFollowRedirects(true).end();
.........
}
@az-auddin - this sounds fine. We'll put in on the list, but community PRs are welcome -- if you know right how to fix it, will be faster for you to submit. Thanks.
Thanks for looking into it. Let me create a PR with the fix.
Fix will be part of https://github.com/prebid/prebid-server-java/pull/3440