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

Client fails to follow 301 relative location redirection #278

Closed
hananaharonof opened this issue Feb 11, 2018 · 0 comments
Closed

Client fails to follow 301 relative location redirection #278

hananaharonof opened this issue Feb 11, 2018 · 0 comments
Labels
type/bug A general bug
Milestone

Comments

@hananaharonof
Copy link

Hi,

Issue:

URL https://www.ynet.co.il returns 301 with Location header of "/home/0,7340,L-8,00.html". MonoHttpClientResponse#74 calls getRemoteAddress on the returned relative location, which fails with NPE.

According to https://en.wikipedia.org/wiki/HTTP_location relative location should be supported.

Proposed Solution:

It seems that method redirect of ReconnectableBridge does not support relative location. Looking at the code I think a simple change can fix this issue:

Line 150: activeURI = new URI(to);

Should be changed to:

Line 150: activeURI = from.resolve(new URI(to));

Version:
Netty version: 0.7.3

@violetagg violetagg added the type/bug A general bug label Feb 12, 2018
@violetagg violetagg added this to the 0.7.4.RELEASE milestone Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants