Releases: apple/swift-nio
Releases · apple/swift-nio
SwiftNIO 1.0.1
Semver Patch
- Fixed buffer overflow in ByteBuffer (CVE-2018-4281)
SwiftNIO 1.8.0
Semver Minor
- Added new
ByteBufferView
type, exposing portions of aByteBuffer
as aCollection<UInt8>
. AddedByteBuffer.readableBytesView
andByteBuffer.viewBytes(at:length:)
to obtainByteBufferView
objects. (#411) - Renamed
MultiThreadedEventLoopGroup.init(numThreads:)
toMultiThreadedEventLoopGroup.init(numberOfThreads:)
. Deprecated the old name. (#443) - Made
HTTPRequestDecoder.init(leftOverBytesStrategy:)
andenum RemoveAfterUpgradeStrategy
public, which allows users creating custom HTTP pipelines to ensure that removingHTTPRequestDecoder
after an upgrade was attempted does not cause unexpected bytes delivery. (#438)
Semver Patch
SwiftNIO 1.7.2
Semver Patch
- Removed some unnecessary
EventLoopPromise
allocations. (#437) - Fixed issues where removing a
HTTPDecoder
could lead to the pipeline consuming rawByteBuffer
s, rather than decoded HTTP components. (#430) - Fixed an issue where datagram writes would be counted incorrectly, potentially leading to precondition failure. (#431)
- Resolved a number of re-entrancy issues with
HTTPDecoder
. (#427)
SwiftNIO 1.7.1
Semver Patch
- Fixed an issue where the bootstraps may not correctly invoke the channel initialisers on the event loop for the channel being initialised, causing substantial overhead when configuring the channel. (#424)
- Fixed issues where
Channel
objects and their associated sockets created by the bootstraps may be leaked if channel registration failed for any reason. (#413) - Fixed issues where the
Channel
may be deallocated before theChannelPipeline
is cleaned up, causing crashes. (#415) - Fixed an issue where
write
promises were satisfied too early onEmbeddedChannel
objects. (#421) - Fixed an issue where the
WebSocketFrameDecoder
would write a connection close frame but not flush it when a protocol error was encountered. (#421) - Worked around a compiler crash with type aliases in 4.2 snapshots. (#420)
- Testing and documentation improvements. (#416, #419, #423, #425)
SwiftNIO 1.7.0
Semver Minor
- Added
ChannelCore.removeHandlers
to help implementers building custom channels do correct channel shutdown. (#408) - Added initial support for sending quiescing signals to
Channel
s, and support for these signals toAcceptHandler
andHTTPServerPipelineHandler
. (#399) - Added executable product
NIOPerformanceTester
to run standardised NIO performance tests. (#396) - Made
EventLoopFuture.hopTo(eventLoop:)
public: while it was introduced in 1.3.0 it was accidentally leftinternal
.
Semver Patch
- Improved the resilience of
ByteToMessageDecoder
against re-entrant calls todecode
. (#370) - Improved performance of writing
Sequence
s toByteBuffer
objects in cases where the standard library has fast-path access. (#391, #392) - Fixed an issue where we could accidentally corrupt headers or URIs when parsing HTTP/1 messages due to re-entrant calls to
decode
. (#385) - Enhanced
SocketChannel
objects to register themselves with theSelector
lazily, allowing them to more easily be used without needing to handle their registration and binding/connection very carefully. (#388) - Removed some warnings when compiling in Swift 4.2 mode. (#407)
- Removed a
String
allocation when readingConnection
headers to determine keep-alive state for HTTP/1. (#402) - Attempted to use
http_parser
's detected keep-alive status as much as possible in server applications, reducing the computation overhead of checking keep-alive status in most cases. (#299) - Removed some reliance on implicit importing of header files on Linux. (#400)
- Fixed minor invalid pointer type assumption. (#397)
- Fixed broken 32-bit support. (#383)
- Miscellaneous tooling and code quality improvements. (#390, #394, #398, #403)
SwiftNIO 1.6.1
SwiftNIO 1.6.0
Semver Minor
- Added new
UnsafeEmbeddedAtomic
type. (#373) - Added
prepend
,removeLast
, andlast
toCircularBuffer
. (#347)
Semver Patch
- Removed warnings in Swift 4.2. (#374)
- Added more license documentation for 3rd party modules. (#251)
- Fixed an issue where connect promises could be leaked without being failed. (#337)
- Reduced the number of memory allocations required to create an
EventLoopFuture
. (#373) ByteBuffer
's debug output is now compatible with being parsed byxxd
. (#367)- Fixed a bug where WebSocket frames could be delivered multiple times on connection closure. (#368)
ByteBuffer.discardReadBytes
no longer triggers a memory copy if the buffer was fully consumed. (#363)- Improved the ability of the compiler to specialise
ByteBuffer
copies of contiguous data types. (#360) - Worked around an optimiser bug that caused unnecessary heap allocations when writing
StaticString
objects intoByteBuffer
s. (#354) - Added dtrace scripts for debugging memory allocations. (#352)
- Greatly reduced the overhead of passing
HTTPRequestHead
andHTTPResponseHead
around theChannelPipeline
by placing them into a CoW heap-allocated box. (#351) - Shrunk the size of
ByteBuffer
andFileRegion
to fewer than 3 words, ensuring that enums that wrap these types can still fit into an existential container without triggering heap allocation. (#349) - Fixed a bug where the
HTTPServerPipelineHandler
would incorrectly deliver message parts out of order. (#348) - Fixed a bug where
Channel.localAddress
andChannel.remoteAddress
would benil
duringchannelInactive
andhandlerRemoved
callbacks. (#346) - Improved the performance of
HTTPHeaders[canonicalForm:]
in the case where no headers with that header name exist. (#344) - Miscellaneous code & testing improvements. (#335, #338, #353, #356, #357, #358, #361, #362, #365, #366, #371, #375, #376)
- Documentation improvements. (#359)
SwiftNIO 1.5.1
SwiftNIO 1.5.0
Semver Minor
- Improved
HTTPServerProtocolErrorHandler
andHTTPServerPipelineHandler
to interact better together.HTTPServerPipelineHandler
now also buffers protocol errors, preventing theChannelPipeline
from seeing those errors until the correct sequence point.HTTPServerProtocolErrorHandler
now avoids emitting 400 errors if a partial response is already in flight. (#314) - Enhanced
WebSocketUpgrader
to allow overriding the default maximum websocket frame size. (#315) - Made
IdleStateHandler.IdleStateEvent
public: it had accidentally been made internal. (#319) - Enhanced the
ChannelCore
protocol withunwrapData
, allowing externalChannelCore
implementers to unwrapNIOAny
wrappers. (#321) - Enhanced
BlockingIOThreadPool
with arunWithActive
method that automatically fails submitted tasks if the pool has been shut down. (#256) - Enhanced
NonBlockingFileIO
struct with a non-blockingopenFile
method, allowing users to avoid making blockingopen
syscalls. (#256) - Made
HTTPResponseHead
andHTTPRequestHead
mutable. (#324) - Enhanced all NIO core channels with support for registering already-active sockets (that is, sockets that have had
connect
,listen
, orbind
called on them already) with NIO event loops, preventing the need to double-call some of these syscalls, an operation that is not always safe. (#285) - Enhanced the
ServerBootstrap
andDatagramBootstrap
with awithBoundSocket(descriptor:)
method that can take an already-bound socket and use it as the basis for a channel. (#285) - Enhanced the
ClientBootstrap
with awithConnectedSocket(descriptor:)
method that can take an already-connected socket and use it as the basis for a channel. (#285)
Semver Patch
- Fixed issues in HTTP/1 framing where some requests and methods that never have bodies would not parse correctly if they were missing transport headers. (#298)
- Fixed issues in HTTP/1 framing where EOF was not being passed to the parser to help it decode request/response bodies that are terminated by EOF. (#298)
- Improved the performance of writing the HTTP/1 request-line and response-line in most cases. (#300)
- Reduced the number of heap allocations required to manage the state of pending stream writes. (#308)
- Started processing EOF and socket reset eagerly, rather than attempting to buffer it. This resolved a number of issues with hot-looping on
epoll_wait
. (#286, #325) - Vastly reduced the number of allocations required to write/read integers to/from
ByteBuffer
s. (#316) - Improved error handling when
connect
fails synchronously, preventing the FD from being registered with the selector. (#329) - Started failing pending connect promises before notifying the pipeline of change
channelInactive
, instead of after. (#330) - Many fixes and improvements to the tests. (#311, #318, #326, #332, #331, #334)
- Miscellaneous code improvements (#312)