Skip to content

2.4.0

Compare
Choose a tag to compare
@LaunchDarklyReleaseBot LaunchDarklyReleaseBot released this 06 Jan 20:14

[2.4.0] - 2022-01-06

This release fixes a number of SSE spec compliance issues which do not affect usage in the LaunchDarkly Java and Android SDKs, but could be relevant in other use cases.

Added:

  • EventSource.Builder.readBufferSize

Changed:

  • The implementation of stream parsing has been changed. Previously, we were using BufferedSource from the okio library, but that API did not support \r line terminators (see below). Now we use our own implementation, which is simpler than BufferedSource and is optimized for reading text lines in UTF-8.
  • The CI build now incorporates the cross-platform contract tests defined in https://github.com/launchdarkly/sse-contract-tests to ensure consistent test coverage across different LaunchDarkly SSE implementations.

Fixed:

  • The stream parser did not support a \r character by itself as a line terminator. The SSE specification requires that \r, \n, and \r\n are all valid.
  • If an event's id: field contains a null character, the whole field should be ignored.
  • The parser was incorrectly trimming spaces from lines that did not contain a colon, so for instance data[space] was being treated as an empty data field, when it is really an invalid field name that should be ignored.