Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.5 - 2025-11-05
Fixed
- Fixed a type warning on Elixir 1.19+ about struct updating in the
Extensionmodule.
1.0.4 - 2024-06-14
Fixed
- Fixed a compilation warning present with Elixir 1.17+ about "
4..1" not using a range step.
1.0.3 - 2023-04-16
Fixed
- Unexpected continuation frames are now handled.
- Previously, unexpected continuation frames received from a server would result in a FunctionClauseError.
1.0.2 - 2022-12-11
Fixed
- Dialyzer errors have been fixed and specs have been improved.
1.0.1 - 2022-09-18
Fixed
- WebSocket frames are now correctly buffered when a partially received frame is split in the payload-length segment.
1.0.0 - 2022-04-12
v1.0.0 is released!
We've been using Mint.WebSocket in production for the better part of a year
without trouble.
v1.0.0 is code-wise the same as v0.3.0: it represents a stability milestone.
Mint.WebSocket will now follow semantic versioning, so any breaking changes
will result in a v2.0.0.
0.3.0 - 2022-02-27
Changed
- Failure to upgrade now gives a
Mint.WebSocket.UpgradeFailureErroras the error when a server returns a status code other than 101 for HTTP/1 or a status code outside the range 200..299 range for HTTP/2.
0.2.0 - 2022-02-17
This release is a breaking change from the 0.1.0 series. This update removes
all instances where Mint.WebSocket would access opaque Mint.HTTP.t/0 fields
or call private functions within Mint.HTTP1, so now Mint.WebSocket should be
more compatible with future changes to Mint.
Upgrade guide
First, add the scheme argument to calls to Mint.WebSocket.upgrade/5.
For connections formed with Mint.HTTP.connect(:http, ..), use the :ws
scheme. For Mint.HTTP.connect(:https, ..), use :wss.
- Mint.WebSocket.upgrade(conn, path, headers)
+ Mint.WebSocket.upgrade(scheme, conn, path, headers)Then replace calls to Mint.HTTP.stream/2 and/or Mint.HTTP.recv/3 and
Mint.HTTP.stream_request_body/3 with the new Mint.WebSocket wrappers.
This is safe to do even when these functions are being used to send and
receive data in normal HTTP requests: the functionality only changes when
the connection is an established HTTP/1 WebSocket.
Added
- Added
Mint.WebSocket.stream/2which wrapsMint.HTTP.stream/2 - Added
Mint.WebSocket.recv/3which wrapsMint.HTTP.recv/3 - Added
Mint.WebSocket.stream_request_body/3which wrapsMint.HTTP.stream_request_body/3
Changed
- Changed function signature of
Mint.WebSocket.upgrade/5to accept the WebSocket's scheme (:wsor:wss) as the first argument - Added an optional
optsargument toMint.WebSocket.new/5to control active vs. passive mode on the socket - Restricted compatible Mint versions to
~> 1.4Mint.WebSocketnow usesMint.HTTP.get_protocol/1which was introduced in1.4.0.
0.1.4 - 2021-07-06
Fixed
- Fixed typespec for
Mint.WebSocket.new/4
0.1.3 - 2021-07-02
Fixed
- Switch from using
Bitwise.bor/2to:erlang.bor/2for compatibility with Elixir < 1.10
0.1.2 - 2021-07-02
Fixed
- Switch from using
Bitwise.bxor/2to:erlang.bxor/2for compatibility with Elixir < 1.10
0.1.1 - 2021-07-01
Fixed
- Close frame codes and reasons are now nillable instead of defaulted
- The WebSocket spec does not require that a code and reason be included for all close frames
0.1.0 - 2021-06-30
Added
- Initial implementation
- includes HTTP/1.1 and HTTP/2 support and extensions