Skip to content

v1.0.3

Choose a tag to compare

@mrrubinos mrrubinos released this 12 Aug 07:37
· 19 commits to main since this release
fc1321c

Added

  • nhttp_ws_frame:scan_utf8/1 and nhttp_ws_frame:scan_utf8/2 scan a run
    of text for UTF-8 validity and return the trailing bytes that do not yet
    form a character

Changed

  • nhttp_ws:decode_with_state/2 returns {continue, Rest, Decoder} when it
    consumes a non-final fragment. The call returned {more, 1, Decoder}
    before, which hid the fact that the frame was consumed

Fixed

  • Return the unconsumed rest of the buffer after a WebSocket fragment. A
    caller that kept the whole buffer decoded the same fragment again and
    failed with expected_continuation
  • Validate a fragmented text message as UTF-8 (RFC 6455 §5.6) per fragment,
    with the character that spans two frames carried across. A message that
    ends with a truncated character is refused as invalid_utf8

Full Changelog: v1.0.2...1.0.3