-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add semicolonIsNormalChar and maxParams properties to the server config #11416
base: 4.8.x
Are you sure you want to change the base?
Conversation
glad to receive your review @yawkat @graemerocher @dstepanov @sdelamo |
@@ -598,6 +606,39 @@ public void setNotFoundOnMissingBody(boolean notFoundOnMissingBody) { | |||
this.notFoundOnMissingBody = notFoundOnMissingBody; | |||
} | |||
|
|||
/** | |||
* @return {@code true} if ';' is normal, {@code false} 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.
Please describe it a bit more, it's not clear that this is relating to query parameters.
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.
edited, describe it really clear now i guess
* @return {@code true} if the semicolon is a normal character, {@code false} otherwise. | ||
* @since 4.8 | ||
*/ | ||
public boolean isSemicolonIsNormalChar() { |
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.
I'm not sure this belongs in HttpServerConfiguration
since I am unsure the other server implementations (jetty, tomcat etc.) allow this kind of configuration. For the moment it should be moved to NettyHttpServerConfiguration
. @yawkat WDYT?
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.
Agreed
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.
Hm actually since this also affects our non-netty copy of QueryStringDecoder, I guess it's fine here
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.
@graemerocher AbstractNettyHttpRequest uses HttpServerConfig interface for a config field, that's why i wrote it there, but it seems strange to me too, i think it should use NettyHttpServerConfig interface due to strong AbstractNettyHttpRequest bind to Netty
/** | ||
* @return true if the semicolon handle as a normal character, false otherwise. | ||
*/ | ||
boolean isSemicolonIsNormalChar(); |
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.
to avoid a breaking change this should be a default method that returns false
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
*/ | ||
public void setSemicolonIsNormalChar(boolean semicolonIsNormalChar) { | ||
this.semicolonIsNormalChar = semicolonIsNormalChar; | ||
} |
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.
I don't see any changes to DefaultFormUrlEncodedDecoder
that would respect this configuration
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
@graemerocher ping |
fix #11411