-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Quoted Request Log #12834 #12835
Quoted Request Log #12834 #12835
Conversation
Quote values that need to be quoted Track quotes in format string.
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 think it looks fine, but you may want to get a review from someone more au fait with the request log format.
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java
Show resolved
Hide resolved
{ | ||
} | ||
|
||
//-----------------------------------------------------------------------------------// |
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.
Let's get rid of these separators, here and in the method above.
|
||
HttpTester.Response response = getResponse(""" | ||
GET / HTTP/1.0 | ||
User-Agent: bad"value |
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 tried to motify this test with User-Agent: bad\\"value
, as if an application had already escaped the dquote.
The result is: "User-Agent: \"bad\\\\\\\"value\", \"bad\\\\\\\"value\""
.
Is this expected? I would have expected the original value (perhaps quoted), which was already properly escaped.
Signed-off-by: Simone Bordet <[email protected]>
Fixes #12834 Quote request log values that need to be quoted
Track quotes in format string.