If response's status code is 3xx, we need to fix the location.

I've added a test for it.