- Fix issue with
decode_packetnot handling http method as binary.
- Resolve misleading IPv6 support documentation.
- Rename
enable_ipv6toforce_ipv6.
- Bumb
gleam_stdlibto the v1.
- Bump
websocksto next major.
- Sanitize CRLF sequences in outgoing HTTP response headers.
- Eliminate
string.lowercasein a codebase: validate and lowercase header field names in a single pass, validate and lowercase important protocol header values (liketransfer-encoding,connection,upgradeand more) at parse time. - Include validation of trailer header field names and values during chunked body parsing.
- Remove redundant UTF-8 validation on WebSocket
Textframe payloads.
- Remove all usage of
string.inspectas it is an anti-pattern for logging. - Fix infinite loop and adjust allowed entries for trailer headers.
- Improve and expand logging messages.
- Improve path parsing.
- Fix glisten being incorrectly supervised on start.
- Update glisten to next major release.
- Default
on_starthandler now usesio.printlnin addition to logging, so the startup message is visible even without a logger configured.
- Gracefully handle HTTP/2 connections: h2c upgrade requests are served as HTTP/1.1, and direct HTTP/2 connections receive a GOAWAY with HTTP_1_1_REQUIRED instead of being silently dropped.
- Fixed HTTP/2 prior-knowledge detection in ffi
- Refactored internal buffer module and moved to
http1
- Fix README file
- Fix bug where WebSocket was unusable with TLS enabled
- Remove
bind_all - Adjust documentation
- Add HTTPS example
- Bump dependency package versions
- Move examples to appropriate folder
- Improve examples with useful documentation lines
- Replace active socket tcp message decoding for WebSocket selector
- Improve internal codebase
- Replace
exceptionmodule with a package
- Bring back active socket option for SSE
- Add
send_close_framefunction for the WebSocket API - Add
CloseCodefor various close frames
- Replace
grampswithwebsockspackage - Remove alias names for internal stream modules
- Improve script that change documentation
- Move
gleam_cryptopackage as dev dependency
- Refactor internal handler code
- Support multiple directives in the
connectionheader during upgrade to WebSocket
- Update the websocket implementation to set active mode to
Countto receive N messages, rather than settingOnceevery message
- Change API of chunked response to match other streaming APIs
- Handler's process is not waiting until streaming actors are done
- All new actors that are spawned by streaming APIs are now being supervised with factory supervisor
- Ensure
compressopackage is fixed version
- Improve internal comments
- Add logging
- Remove deprecated
result.unwrap_both - Support for automatic
gzipcontent encoding for HTTP responses except file sending.
- Rename internal imports
- Fix invalid ffi file namings
- Add support for Server-Sent Events
- Better README file
- Adjust types & functions to follow responsibilities of a web server, completely excluding potential framework-like features.
- Improve validation of
upgradeheader when upgrading to WebSocket connection. - Remove internal
informationactor for retrieving server information. - Improve documentation.
- Expand files response body with optional size limit and offset.
- Add
dateheader to responses. - Add
RequestandResponsealiases. - Add new response body:
FileandChunkedData. They can be set withewe.fileandewe.chunked. - Fix server still listening on a socket after
connection: close. - Keep-alive connection closes after 10_000 milliseconds of idling. Can be adjusted in builder using
ewe.idle_timeout.
- Add WebSocket connection failures for control frames with payloads up to 125 octets.
- Fix control frames matching to properly extract rest frames from a list of aggregated frames.
- Store incomplete frames in WebSocket state until they are fully received.
- Ensure unexpected continuation frames correctly cause an abnormal stop.
- Add handling for control frames interleaved with fragmented data frames.
- Overall match implementation to pass Autobahn TestSuite.
- Add
ewe.continue_with_selectorto continue processing WebSocket messages, including selector for custom messages. - Add proper conditions for
connection: close. - Expand request's host header parsing.
- Send response with proper status code on HTTP parser failure before closing connection.
- HTTP parser now handles host header duplication, invalid content-length format, and headers with invalid control characters.
- Quick documentation fix
- Add
ewe.stream_bodyfor streaming the request body (including chunked encoding). - Simplified
Buildertype. - Add internal
Buffertype. - Add
ewe.quietfor setting emptyon_startfunction. - Rename multiple functions and types, add aliases for clarity.
- Add
ewe.on_closeargument for WebSocket upgrade function. - Add bunch of comments and separated internals into logical sections.
- Add support for custom user messages in WebSocket handlers. The
on_initfunction now receives aprocess.Selectorthat can be used to listen for custom messages sent from other parts of the application. - Custom messages are delivered to WebSocket handlers as
ewe.User(message)type. - Add permessage-deflate compression support for WebSocket connections. When enabled, messages are automatically compressed using defalte algorithm, reducing bandwidth usage for text-heavy applications.
- HTTP parser now handles trailers when working with chunked encoding.
- Remove
ewe.with_read_body, leavingewe.read_bodyas the only option to read the body. - Improve documentation page by adding headers for each logical section (see smol).
- Improve WebSockets. Users can now specify state with
on_initfunction. WebSocket handler accepts connection, user's state and message.ewe.continuerequires user to specify new state. - Add
ewe.send_binary_frameandewe.send_text_frame, allowing to send messages back to the client.
- Response body must now be of type
ResponseBody. To set the response body, use the following functions:ewe.text,ewe.bytes,ewe.bits,ewe.string_tree,ewe.empty,ewe.json. - HTTP parser now handles
Expect: 100-continue. - Optimize formatting of popular HTTP fields without wasting time on transforming from
BitArraytoString. - Duplicate request headers are now being combined (except
set-cookie).
- Implement WebSocket protocol; request can be upgraded in handler using
ewe.upgrade_websocket. - Every message received in WebSocket handler is of
WebsocketMessagetype. - Handler must return a
Nexttype, which can be created usingewe.continue,ewe.stopandewe.stop_abnormal. - Add
ewe.bitsfor setting response body fromBitArraytype. - Add experimental
ewe.use_expression. - Rename internal file from
response.gleamtoencoder.gleam, matchingdecoder.gleamfile.
- Remove atom values from ffi's
decode_packet. - Request handler is now rescued during crashes, thanks to ffi's
rescuefunction. - Add new
on_crashoption that sends a custom response when the handler is rescued. Useewe.on_crashto configure this option. - Glisten server is now part of a supervision tree along with an information actor for managing server state. Server information can be extracted using
ewe.get_server_info. - Add new
info_worker_nameoption for naming the information worker's subject. Useewe.with_nameto configure this option. ewe.client_statsis now namedewe.get_client_infofor consistency with the server getter pattern.- Add
ewe.with_random_portthat setsportto0. - Add
ewe.with_read_bodythat allows reading the body before passing the request to the handler. - Add
ewe.json,ewe.text,ewe.bytesfor different response body. - Fill documentation