ok2c commented on code in PR #900:
URL:
https://github.com/apache/httpcomponents-client/pull/900#discussion_r4366619846
##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java:
##########
@@ -236,8 +242,9 @@ public List<Header> formatCookies(final List<Cookie>
cookies) {
buffer.append(PARAM_DELIMITER);
buffer.append(' ');
}
- buffer.append(cookie.getName());
- final String s = cookie.getValue();
+ final String name = replaceControlChars(cookie.getName());
Review Comment:
@dxbjavid Let's make it more efficient. One can transfer the name and value
content directly into `buffer` without creation of an intermediate string. See
how the escaping of `DQUOTE_CHAR` and `ESCAPE_CHAR` has been implemented.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]