Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects lose the HTTP method, body and headers from the original request. #327

Open
glennporter-examtime opened this issue Mar 5, 2015 · 0 comments

Comments

@glennporter-examtime
Copy link
Contributor

If a response is a redirect, it gets redirected to the new location, but the HTTP method of the new request defaults to GET if the original one isn't HEAD.

AsyncHttpClient.setDataEmitter...
final String method = request.getMethod().equals(AsyncHttpHead.METHOD) ? AsyncHttpHead.METHOD : AsyncHttpGet.METHOD;

I'm not sure if this is for a reason or just a little mistake.
Also in the same method, only the "User-Agent" and "Range" headers are copied across to the new request.
The original request body is not included at all in the new request.

I've raised a pull request (#326) to address these... there may be a better way of dealing with them, but it works for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant