v1.0.3
Added
nhttp_ws_frame:scan_utf8/1andnhttp_ws_frame:scan_utf8/2scan 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/2returns{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 withexpected_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 asinvalid_utf8
Full Changelog: v1.0.2...1.0.3