I am using the Volley framework in a project where I always need to handle the redirects myself to handle the headers.
How redirects are handled depends right now o
If you don't care about old APIs (< 9) and you just want volley stop following redirects you can do
RequestQueue requestQueue = Volley.newRequestQueue(context, new HurlStack() {
@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
HttpURLConnection connection = super.createConnection(url);
connection.setInstanceFollowRedirects(false);
return connection;
}
});