When redirecting XHR requests to an empty URL the response body should not be overwritten. Fixes #3835