arturobernalg opened a new pull request, #919: URL: https://github.com/apache/httpcomponents-client/pull/919
The parser accumulated an unterminated line, or `data:` lines without a blank line, without any limit, so a misbehaving server could exhaust the heap. Reproduced with a single unterminated line: `OutOfMemoryError` after 64 MiB with `-Xmx256m`. `EventSourceConfig` now has `maxLineLength` (1 MiB) and `maxEventSize` (8 MiB). When a limit is exceeded the stream fails with `MessageConstraintException`, reported through the listener failure callback, and its buffers are released. Values <= 0 are rejected. Tests added for both parsers. A failed stream may reconnect under the usual backoff. -- 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]
