You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "dxbjavid (via GitHub)" <gi...@apache.org> on 2026/10/20 05:31:55 UTC

[PR] strip control characters when writing the cookie header [httpcomponents-client]

dxbjavid opened a new pull request, #900:
URL: https://github.com/apache/httpcomponents-client/pull/900

   RFC6265CookieSpec.formatCookies copies the cookie name and value into the Cookie request header without removing control characters. On the classic transport the header is serialised from the raw buffer of the BufferedHeader rather than its getValue(), so a cookie whose name or value was populated from attacker-influenced data and carries a CR or LF is written out verbatim and splits the Cookie line, which lets further request headers be injected. This replaces CR, LF and NUL with a space in the name and value before they are formatted, matching what BufferedHeader.getValue() already does when the value is read back and keeping cookie-name and cookie-value within what RFC 6265 permits.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6432893529

   Thanks for the merge.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6295689602

   @dxbjavid  @arturobernalg Can we take a step back and take at the problem from a broader view.
   
    But first, I really do not like this
   
   > On the classic transport the header is serialised from the raw buffer of the BufferedHeader rather than its getValue()
   
   Does that mean the async transport behaves differently in that regard? If so, this needs to be fixed first and foremost. 
   
   Then, is this problem really specific to RFC6265 cookie spec? Should not it be fixed at at the HTTP/1.1 connection layer for headers of any type?


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on code in PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#discussion_r4370534130


##########
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 Very good. Do you mind though if I inline `#appendReplacingControlChars` method?



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6288737706

   good catch on the spaces. i've changed it so a maximal run of CR/LF/NUL collapses to a single space, so a folded CRLF now leaves one space rather than a run of them, and updated the expected value to match (sid="abc Injected: evil").
   
   on the second point, agreed, this only neutralises the write-side injection vector and isn't meant to fully validate the name against the token grammar or the value against cookie-octet. i kept the change narrow to the CR/LF/NUL that split the header, matching what BufferedHeader.getValue() already does on read-back. happy to follow up with stricter cookie-name/cookie-value validation as a separate change if you'd like it.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6295840976

   @dxbjavid As far as I can see the behavior of the classic and the async message writers looks consistent
   
   https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/AbstractMessageWriter.java#L86
   https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractMessageWriter.java#L87


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6308048634

   you're right that the two writers are consistent. both take the FormattedHeader's raw CharArrayBuffer and write it verbatim, so this isn't a classic-vs-async difference, and my wording in the description was misleading on that. the asymmetry is really within the header itself: BufferedHeader.getValue() substitutes CR/LF/NUL with a space, but the buffer the writers serialise keeps them.
   
   agreed too that the proper place for a write-side guard is the HTTP/1.1 header serialisation, so it covers headers of any type rather than just RFC6265 cookies. that lives in httpcore (AbstractMessageWriter), so it'd be a change over there, not here. happy to raise it against httpcomponents-core, either stripping the control characters at serialisation or rejecting a header that carries them, whichever you'd prefer. if you'd rather fix it centrally i can close this one, or leave it as a narrow cookie-spec stopgap until the core change lands.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on code in PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#discussion_r4371656390


##########
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:
   not at all, go ahead. it only has the two call sites, so inlining it is fine by me.



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6359769132

   re-spun as suggested. instead of rewriting the name and value, the spec now rejects a cookie carrying a control character (%x00-1F or %x7F): validate() throws MalformedCookieException, so a Set-Cookie with one is dropped before it reaches the store, and formatCookies() throws IllegalArgumentException per its documented contract rather than writing it into the Cookie header. the sanitising code is gone and the description is updated to match.
   
   one thing worth a sanity check: on the write side this fails the request rather than quietly skipping the cookie, which seemed right for something that should never have made it into the store, but i can switch it to skipping with a warning if you'd prefer. 1079 tests and checkstyle pass locally.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6313117305

   @dxbjavid It looks like @arturobernalg has found the root cause of the issue. The unchecked conversion from char to byte can only occur when the user has explicitly specified a non-standard charset for HTTP message elements. I personally do not see this as a very severe problem, but if we decide to fix it it should be fixed in core (the session buffer layer). 


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6333229156

   @ok2c @arturobernalg that matches what i see now. with no charset configured, SessionOutputBufferImpl.writeLine copies the header buffer through ByteArrayBuffer.append, which runs every char through TextUtils.castAsByte, so CR/LF/NUL go out as '?' and the Cookie line can't be split. my test only looked at the FormattedHeader buffer rather than the bytes that actually reach the socket, so the description overstated it for the default setup, sorry about that.
   
   the gap that's left looks to be the encoder path (writeEncoded), which only applies when a non-standard charset has been set explicitly and hands the chars to the CharsetEncoder unchecked. agreed that's low severity and belongs in the session buffer layer in core. i can open a small PR against httpcomponents-core that applies the same substitution there if that's useful. as for this one, i'm happy to keep it as an extra cookie-level safeguard or close it, whichever you prefer.
   


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6335811315

   @dxbjavid What we can still do in client is to reject cookies with non-printable chars in them as invalid, given sensitive nature of cookies.. Please do feel to re-spin your change-set and please do continue contributing. 


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c merged PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "arturobernalg (via GitHub)" <gi...@apache.org>.
arturobernalg commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6335120016

   > @ok2c @arturobernalg that matches what i see now. with no charset configured, SessionOutputBufferImpl.writeLine copies the header buffer through ByteArrayBuffer.append, which runs every char through TextUtils.castAsByte, so CR/LF/NUL go out as '?' and the Cookie line can't be split. my test only looked at the FormattedHeader buffer rather than the bytes that actually reach the socket, so the description overstated it for the default setup, sorry about that.
   > 
   > the gap that's left looks to be the encoder path (writeEncoded), which only applies when a non-standard charset has been set explicitly and hands the chars to the CharsetEncoder unchecked. agreed that's low severity and belongs in the session buffer layer in core. i can open a small PR against httpcomponents-core that applies the same substitution there if that's useful. as for this one, i'm happy to keep it as an extra cookie-level safeguard or close it, whichever you prefer.
   
   @dxbjavid 
   Thanks for confirming. This is already addressed by https://github.com/apache/httpcomponents-core/pull/725, which covers the explicit charset encoder path in both classic and async transports.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "arturobernalg (via GitHub)" <gi...@apache.org>.
arturobernalg commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6309987552

   > @dxbjavid @arturobernalg Can we take a step back and take look at the problem from a broader view.
   > 
   > But first, I really do not like this
   > 
   > > On the classic transport the header is serialised from the raw buffer of the BufferedHeader rather than its getValue()
   > 
   > Does that mean the async transport behaves differently in that regard? If so, this needs to be fixed first and foremost.
   > 
   > Then, is this problem really specific to RFC6265 cookie spec? Should not it be fixed at at the HTTP/1.1 connection layer for headers of any type?
   
   Agreed. `FormattedHeader` bypasses the normal header formatting, so this is not cookie-specific. The fix belongs in HttpCore's HTTP/1 serialization layer, covering both classic and async transports.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] strip control characters when writing the cookie header [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#issuecomment-6311996019

   > you're right that the two writers are consistent. both take the FormattedHeader's raw CharArrayBuffer and write it verbatim, so this isn't a classic-vs-async difference, and my wording in the description was misleading on that. the asymmetry is really within the header itself: BufferedHeader.getValue() substitutes CR/LF/NUL with a space, but the buffer the writers serialise keeps them.
   > 
   > agreed too that the proper place for a write-side guard is the HTTP/1.1 header serialisation, so it covers headers of any type rather than just RFC6265 cookies. that lives in httpcore (AbstractMessageWriter), so it'd be a change over there, not here. happy to raise it against httpcomponents-core, either stripping the control characters at serialisation or rejecting a header that carries them, whichever you'd prefer. if you'd rather fix it centrally i can close this one, or leave it as a narrow cookie-spec stopgap until the core change lands.
   
   @dxbjavid I do not mind having an extra safe-guard in RFC6265 cookie policy, but I want to understand if there is a bigger problem at the low transport level. As far as I understand there is already a safe-guard to ensure no non-printable characters can end up in the session buffer. See `TextUtils#castAsByte` and its usage.
   
   I am actually not sure there is a problem at all.


-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on code in PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#discussion_r4362233617


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java:
##########
@@ -236,8 +242,11 @@ public List<Header> formatCookies(final List<Cookie> cookies) {
                 buffer.append(PARAM_DELIMITER);
                 buffer.append(' ');
             }
-            buffer.append(cookie.getName());

Review Comment:
   @dxbjavid `#formatCookies` looks like the wrong place to throw `IllegalArgumentException` and rather too late. Those cookies come from the `CookieStore` of the caller and can be considered validated. What we can do instead is filter non-printable characters out or replace with `?`. 



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on code in PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#discussion_r4366004226


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java:
##########
@@ -236,8 +242,11 @@ public List<Header> formatCookies(final List<Cookie> cookies) {
                 buffer.append(PARAM_DELIMITER);
                 buffer.append(' ');
             }
-            buffer.append(cookie.getName());

Review Comment:
   fair point, formatCookies is the wrong place to fail. it now runs the name and value through a replacement that swaps each control char (%x00-1F or %x7F) for '?' rather than throwing, which matches what the session output buffer already does on write, so a cookie coming back out of the store can't split the header. validate() still rejects one on the way in, so this is just a defensive fallback for anything that bypassed validation. tests updated to assert the sanitised wire output.



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [PR] reject cookies with control characters as invalid [httpcomponents-client]

Posted by "dxbjavid (via GitHub)" <gi...@apache.org>.
dxbjavid commented on code in PR #900:
URL: https://github.com/apache/httpcomponents-client/pull/900#discussion_r4369816612


##########
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:
   makes sense. the intermediate string is gone now: the name and value are copied straight into the buffer, with any control character swapped for '?' as it's appended, the same way the quote and backslash escaping is done. containsSpecialChar still runs on the raw value, which is fine since none of the special chars are control chars, so the quoting decision doesn't change. tests pass unchanged.



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org