Switching from HttpRequests to apache http client fixes the problem