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: [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]

Reply via email to