dxbjavid commented on PR #890: URL: https://github.com/apache/httpcomponents-client/pull/890#issuecomment-6030823089
good catch, you're right. the problem was that the BOM-miss path in the byte consumer appended the resolved byte straight to the line buffer, so a leading lone CR never saw the CR/LF logic. i've pulled that per-byte handling into a small `processByte` helper and the BOM path now routes its bytes (including any backfilled 0xEF/0xBB from a partial match) through it, so `\rdata: v\r\r` now produces `data = v`. added a regression test for the leading-CR case too. the char consumer peeks the BOM without consuming it, so it already drops the byte into the normal loop and wasn't affected. -- 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]
