-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
This fixes an issue where Zuul does not correctly handle absolute URIs from Netty #1180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// absolute uri | ||
if (m.matches()) { | ||
String match = m.group(3); | ||
path = match == null ? uri : match; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't read great. Consider making the assignment explicit on each branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
// absolute uri | ||
if (m.matches()) { | ||
String match = m.group(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding an example URI in the comment. 3
reads like a magic number otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment at the top.
As per https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 the path segment of an inbound request can have an absolute URI in it. This fixes an issue where Zuul assumes that it's always a relative URI.