2.5.1 (2021-05-28)

General

  • [Bugfix] Disabled strack trace collection for BufferPool releases

HTTP/2

  • [Bugfix] First request over HTTP/2 doesn't set ProcessingStarted

SocketIO 3

  • [Bugfix] [MsgPackParser] Skip object reading when there's no OnError subscriber

2.5.0 (2021-05-17)

Websocket

General

  • [Improvement] Added log when the DNS query is finished
  • [Improvement] Buffer improvements
  • [Bugfix] More Unity DateTime locale bug workaround

SocketIO 3

  • [Bugfix] Fixed emitting to custom namespaces
  • [Bugfix] Default namespace not going to be opened by default

SignalR Core

  • [Improvement] Added vector serializers compatible with Neuecc's MessagePack implementation
  • [Bugfix] Cancel and clear (async) invocations when the connection is closed
  • [Bugfix] Fixed case where reconnecting opened more connections

2.4.0 (2021-03-18)

General

  • [Improvement] Threads are now started as background threads
  • [Improvement] Reworked HTTPRequest timeout handling, now callbacks are called almost instantly.
  • [Improvement] Moved LitJson to the source folder instead of the examples, now it's under the BestHTTP.JSON namespace.
  • [Bugfix] ISSUE-53 Redirect fails when UriBuilder escapes query string in the redirect location

Socket.IO 3

SignalR Core

  • [Bugfix] [Long-Polling Transport] stream got disposed while the transport tried to reuse it
  • [Improvement] Introduced MessagePackProtocolSerializationOptions to be able to change how enums are serialized

EventSource

  • [Bugfix] [WebGL] Call Close on the browser's EventSource object to prevent its autmatic reconnection

HTTP

  • [Improvement] [WebGL] UploadStream is now going to be uploaded too.

2.3.2 (2021-01-06)

TLS

  • [New Feature] TLS Security Addon is now available!
  • [Bugfix] Disabled chacha20-poly1305-04 as it seems it has a data corruption bug
  • [Improvement] Improved compatibility with other TLS handlers by not aborting the TLS connection if the server sends back an encrypt-then-mac extension when a non blockcipher is selected

General

  • [Bugfix] Start to count down for a request's timeout when a HTTP1 or 2 handler picks it for processing
  • [Bugfix] Caching discarded entities when it has only Cache-Control header with a max-age directive
  • [Improvement] An already finished but waiting for processing its callback not going to be aborted by a timeout or direct Abort call
  • [Improvement] When wrapping an Exception, AsyncHTTPException's message is going to be the exception's message

SocketIO

  • [Bugfix] Fixed various issues around custom namespaces

SignalR Core

  • [Improvement] Send back a ping message if the client received one from the server

2.3.1 (2020-12-14)

General

  • [Bugfix] Enable cookies in the editor when the WebGL platform is selected
  • [Bugfix] Redirect to the same url is now breaks out from the redirect cycle
  • [Improvement] DateTime logging changes to workaround a possible Unity issue
  • [Improvement] Fixed HeaderParser compatibility with non-conformant headers
  • [Improvement] HeaderParser is now used to determine whether a response is cachable to use less cpu and memory
  • [Improvement] HTTPRequest's MaxRedirects' default is now 10

HTTP/2

  • [Improvement] Send ENABLE_PUSH = 0 settings to the server

SocketIO

  • [Bugfix] The correct EIO version is sent now with the requests
  • [Improvement] Changed socket notification about transport open to reduce overhead

Websocket

  • [Improvement] Don't log error on application quit

2.3.0 (2020-11-23)

General

  • [New Feature] New Exceptions property for proxies to be able to skip proxy for specified hosts
  • [Bugfix] LitJson dictionary (object) instantiation fix
  • [Bugfix] HeartbeatManager wasn't cleared on application quit

SocketIO

  • [New Feature] Support for Socket.IO 3
  • [New Feature] New ServerVersion option that can be set if the server's Socket.IO version is known
  • [New Feature] New Auth function to send payload while connecting to a namespace (only with Socket.IO 3)
  • [Bugfix] Fixed an issue where reconnection failed if there were an upgrading transport while waiting for reconnect countdown

Websocket

  • [Bugfix] Fixed typo in CloseAfterNoMesssage

SignalR Core

  • [New Feature] Added CancellationToken support for InvokeAsync and SendAsync

2.2.2 (2020-10-22)

Websocket

  • [Bugfix] ServerNoContextTakeover is set to the wrong value in the PerMessageCompression constructor

WebGL

  • [Bugfix] Fixed case where the response got corrupted

2.2.1 (2020-10-20)

TLS

  • [New Feature] Added new HTTPManager.TlsClientFactory callback to be able to provide custom Tls clients
  • [Improvement] X509Name going to cache ToString result
  • [Bugfix] SendCertificateVerifyMessage logged different function name

General

  • [Improvement] Made HTTPManager.GetRootCacheFolder() public instead of internal
  • [Improvement] Switched to all-yellow logging color
  • [Improvement] Renamed FileStreamModes.Open to OpenRead and added new OpenReadWrite
  • [Improvement] ThreadedLogger's thread is now named
  • [Improvement] Added ExitThreadAfterInactivity to ThreadedLogger
  • [Bugfix] Fixed example prefab (ISSUE-36)
  • [Bugfix] New Queued HTTPRequest state for possible double send fix (ISSUE-38)

HTTP/1

  • [Improvement] Request will send Keep-Alive header to the server to let them know about the client setting

HTTP/2

  • [Bugfix] Fixed a possible infinite loop when HTTP2FrameHelper's StreamRead had to read zero bytes, or when the TCP stream is got closed and stream.Read returns zero
  • [Improvement] Removed a few unnecessary instructions from buffer processing

Websocket

  • [Improvement] Lowered CloseAfterNoMesssage's default value to 2 seconds
  • [Bugfix] Buffer used to masking the frame released back to the BufferPool before the masking itself, resulting in a possible frame corruption
  • [Bugfix] Set the websocket's state to Closed on http request error
  • [Bugfix] Removed PingFrequency from timeout calculation

SignalR Core

  • [Bugfix] Fixed issue where calling close on an initial hub connection doesn't lose the connection (and no close callbacks are called either)

SocketIO

  • [Bugfix] Added missing documentation about SocketOptions' AdditionalQueryParams

WebGL

  • [Bugfix] Switch to use the URL class to avoid possible escaping issues
  • [Improvement] Response handling speedup by not copying response body

2.2.0 (2020-09-02)

TLS

  • [Improvement] Bouncy Castle optimizations: depending on the negotiated ciphers download speed can increase and memory hungry parts are also rewritten to use the plugin's BufferPool to decrease GC usage. As parts of the optimizations now the plugin requires the "Allow 'unsafe' Code" to be set
  • [Improvement] Added the use of Encrypt-then-MAC (RFC 7366) extension
  • [Improvement] Added ChaCha20-Poly1305 (RFC 7905 ciphers to the client offered cipher suites to negotiate with the server
  • [Improvement] Moved read buffer to the lowest level to reduce context switching when TLS is used, halving reads per TLS message
  • [Improvement] Removed an optional error throwing to follow browser behavior

General

  • [New Feature] New Timing API to measure when request processing spent most of its time
  • [Improvement] Changed thread names for HTTP/1 and HTTP/2 threads so they can be identified in the profiler
  • [Improvement] Renamed confusing "Remote server closed the connection before sending response header!" exception text
  • [Improvement] IL2CPP optimizations by adding and using Il2CppSetOptionAttribute and Il2CppEagerStaticClassConstructionAttribute
  • [Improvement] Added more places to check request cancellation reducing time requirement in some cases to call the request's callback
  • [Bugfix] Fixed compile errors when BESTHTTP_DISABLE_CACHING and/or BESTHTTP_DISABLE_COOKIES is used
  • [Bugfix] Fixed a bug where an exception thrown while connecting treated as ConnectionTimedOut
  • [Bugfix] When the underlying stream has no more data, ReadOnlyBufferedStream now returns with the value (0 or -1) the stream returned with
  • [Bugfix] Fixed compile error using the old runtime
  • [Bugfix] Dispose a ManualResetEvent used in DNS querying
  • [Bugfix] Test token.IsCancellationRequested before calling final async logic

HTTP/1

  • [Improvement] Use the lower value when server provided keep-alive timeout is available. Timeout is set lower then what sent to be more resistant to lag
  • [Bugfix] With chunked encoding and gzip combined, when the last chunk contained only the gzip trail or parts of it it got truncated and thrown an exception
  • [Bugfix] Fixed bug where redirection occured to the same host while also receiving a Connection: Close header&value resulted in the reuse of the closing connection

HTTP/2

  • [Improvement] Suspending a http/2 session's worker thread now going to take account for the disconnect time too.
  • [Improvement] Preliminary support for RFC 8441
  • [Improvement] Yandex.ru returned with a FLOW_CONTROL_ERROR(3) error when the plugin tried to set the connection window to the RFC defined maximum (2^31 - 1 bytes). Reducing the default by 10 Mib is sufficent.
  • [Bugfix] Various frames' data didn't release back to the BufferPool
  • [Bugfix] Ignore RST_STREAM frame when received for a stream with CLOSED state
  • [Bugfix] Server's initial window size change wasn't handled possibly limiting upload speed
  • [Bugfix] The plugin expected at least 1 byte of data for frames where padding is available corrupting downloaded data where the server inserts frames where only padding is present
  • [Bugfix] Fixed a case where the server sent a HTTP/2 GOAWAY frame caused request(s) to get aborted twice

SignalR

  • [Improvement] Moved unnecessary logging behind a log level check

SignalR Core

  • [Improvement] Added support to be able to serialize floats.

SocketIO

  • [New Feature] [ISSUE-25] HTTPRequestCustomizationCallback implementation

Websocket

  • [Improvement] Made the WebSocketResponse's MaxFragmentSize public and changed its type to int. Now it can be accessed and modified on non-WebGL platforms

2.1.0 (2020-06-29)

General

  • [New Feature] Structured logging to be able to better track parallel requests.
  • [New Feature] New threaded logger.
  • [New Feature] New logging model to support output selection (file, unity's Debug.log, etc.) without changing the logger.
  • [Improvement] New AsyncHTTPException added to be able to access the Status Code of the server's response.
  • [Improvement] The HTTPUpdateDelegator going to be hidden in the inspector
  • [Improvement] HTTPManager's IsQuitting is now public
  • [Improvement] A few functions in the HTTPCacheService and HTTPCacheFileInfo became public.
  • [Improvement] Textures loaded through HTTPResponse's DataAsTexture now going to be marked as non-readable.
  • [Improvement] Made public all EventHelper classes (in the BestHTTP.Core namespace) to be able to subscribe to OnEvent callbacks.
  • [Improvement] Added Third-Party Notices.txt and a similar entry in the documentation.
  • [Bugfix] [ISSUE-10] Fixed a case where HTTPRequest's async isn't returned when called with an already canceled cancellation token
  • [Bugfix] Fixed a name collusion that produced an [Error] Failed to call static function Reset because an object was provided error in the editor.
  • [Bugfix] Fixes for Configurable Enter Play Mode.
  • [Bugfix] Moved SetSocketOption into the nearest try-catch block. It should workaround a rare Unity error where setting KeepAlive on the socket level throws an exception under UWP.
  • [Bugfix] The plugin no longer going to reuse memory assigned to HTTPRequest's RawData.
  • [Bugfix] HTTPCacheService's DeleteEntity now going to be trigger a save library event
  • [Bugfix] Switched to Write locks in HTTPCacheService's SaveLibrary to prevent parallel executions

HTTP/2

  • [New Feature] [ISSUE-15] Trailing headers support.
  • [Improvement] Log unexpected exceptions only when the plugin isn't shutting down
  • [Improvement] Log unhandled frames
  • [Improvement] To fix long-polling request issues over HTTP/2, the plugin no longer closes HTTP/2 streames after 30 seconds when it stays in HalfClosedLocal state.

SignalR Core

  • [New Feature] [ISSUE-5] Implemented connection timeout. However, all IAuthenticationProvider now requires to implement the Cancel method too.
  • [New Feature] GetUpStreamController and GetUpAndDownStreamController now can send non-streaming parameters too.
  • [New Feature] HubOptions now has a new PingTimeoutInterval.
  • [Improvement] Improved the default authenticator to also set the access_token parameter under WebGL
  • [Improvement] Authentication providers now will receive a real websocket url (one that starts with ws:// or wss://) in their PrepareUri to be able to differentiate between HTTP and WebSocket
  • [Bugfix] Send/Invoke tasks don't complete if not connected
  • [Bugfix] Fixed timeout by making it dependent on received messages instead of sent messages.
  • [Bugfix] Pings are not sent by the server for the long-polling transport, so every successful response generates one.

Websocket

  • [Bugfix] [ISSUE-14] Disposing newFrameSignal wasn't thread safe
  • [Bugfix] InternalRequest is now aborted if Close called while connecting.
  • [Improvement] Fixed OnError double checking and reduced it to an else one.

Server-Sent Events

  • [New Feature] Added new OnComment event that will be called for comments sent by the server.
  • [Improvement] Reduced EnqueueProtocolEvent calls when one chunk of data result in more than one events.
  • [Bugfix] It now registers as a protocol and receives cancel requests on shutdown.

2.0.6 (2020-04-15)

General

  • [Bugfix] [ISSUE-3] HTTP/1 - Aborts & timeouts are handled only when there's activity on the handler's thread
  • [Bugfix] Fixed a memory leak of the TCP stream

SignalR Core

  • [Bugfix] [ISSUE-4] Fixed race condition in HubConnection's CloseAsync
  • [Bugfix] When the application is quitting HubConnection is going to report a normal closure now

SocketIO

  • [Bugfix] Fixed a bug where reconnecting while waiting for a pong message prevented all further ping messages

HTTP/2

  • [Bugfix] Fixed a NullReferenceException when the server sends no initial settings.
  • [Bugfix] Fixed a case where streaming was on and the HTTP2Stream closed itself because of a timeout
  • [Bugfix] Moved clean-up code into one place and AutoResetEvent's close is called when both threads are closed insted of the HTTP2Handler's dispose as it might be called sooner while the AutoResetEvent still in use
  • [Bugfix] Request's state is now properly set to TimedOut instead of just Aborted to mach behavior of the HTTP/1 implementation

2.0.5 (2020-03-18)

General

  • [Bugfix] Fixed an out of bounds exception in the StreamList (used by FileConnection) class
  • [Improvement] StreamList now Disposes wrapped streams on the go

SignalR Core

  • [Bugfix] Implemented a workaround for UriBuilder behavior on Query building
  • [Bugfix] [MessagePack Protocol] Fixed a bug in ReadArguments target is unknown
  • [Bugfix] [MessagePack Protocol] BufferPoolMemoryStream now can expand when the initial buffer isn't enough
  • [Bugfix] [MessagePack Protocol] Fixed ReadVarInt as it returned a wrong value
  • [Improvement] [MessagePack Protocol] Type information no longer serialized
  • [Improvement] [MessagePack Protocol] Implemented a new MessagePackExtensionTypeHandler to follow the msgpack spec on sending DateTime

Websocket

  • [Bugfix] newFrameSignal going to be disposed when all threads are finished

HTTP/2

  • [Bugfix] Fixed an issue in the frame view that caused issues when received compressed data.

Examples

  • [New Feature] New MultipartFormDataStream implementation to send streams as multiform/form-data encoded.

2.0.4 (2020-02-11)

General

  • [New Feature] Possible to override read buffer size through the ReadBufferSizeOverride property
  • [Bugfix] Long running streaming requests' state set to Timeout instead of Abort when aborted
  • [Bugfix] Fixed a StackOverflowException when read buffer was larger than StreamFragmentSize
  • [Bugfix] When ConfigureAwait set to false, HTTPResponse's Dispose may called before acccessing Data
  • [Bugfix] Fixed case to avoid overwriting already set cookie name and value
  • [Bugfix] Fixed a memory leak where HostConnection's CloseConnectionAfterInactivity is added back to the Timer
  • [Bugfix] Fixed compiler warning when BESTHTTP_DISABLE_HTTP2 is in use
  • [Bugfix] Don't process cached alt-svc header
  • [Bugfix] HTTPResponse's RawData no longer pooled
  • [Improvement] Run IsCachedEntityExpiresInTheFuture check before anything else to do not open a TCP channel to the server
  • [Improvement] Added "samesite" cookie parsing
  • [Improvement] Log out connector Connect exceptions when log level set to All
  • [Improvement] Refresh data on disk when the stored and downloaded data length differs
  • [Improvement] Call TryToStore on a status code of 304 too
  • [Improvement] Small improvement to allocate less memory per frame in the Timer.cs
  • [Improvement] Cache-Control Stale-On-Error implementation
  • [Improvement] It can handle multiple Cache-Control headers now

HTTP/2

  • [Improvement] Retry added for requests whose started already when the connection is closed
  • [Bugfix] Some requests stuck when their processing started but the connections is closed
  • [Bugfix] Stream id was a static field, instead of a per-connection one
  • [Bugfix] Fixed a case where the reading thread didn't close
  • [Bugfix] Send lower-case header names
  • [Bugfix] Keep around a canceled request's stream to receive and process the server-sent headers. Otherwise the HPACK encoder remains in a faulty state
  • [Bugfix] Aborting a request while processing its header/data frames before the HTTP2Stream's Process set the request's State to Finished, while its result remained null
  • [Bugfix] Added logging for a possible content-length parse error case

SignalR Core

  • [New Feature] New ConnectAsync, CloseAsync, InvokeAsync and SendAsync functions.
  • [New Feature] New sample to demonstrate the usage of the new *Async functions
  • [Bugfix] In some cases the HubConnection remained open while received an error using the Long-Polling transport.
  • [Improvement] New NegotiationResponse property added to the NegotiationResult class. It's a HTTPResponse object reference to the last /negotiate request.

SocketIO

  • [Improvement] New "reconnect_before_offline_packets" event.
  • [Bugfix] Do not delete offline packets on each reconnect attempt

Server-Sent Events

  • [New Feature] New constructor parameter to override default read buffer size on non-WebGL builds when the server sends data non-chunked

2.0.3 (2019-12-06)

General

  • [Improvement] Reworked response reading to do not depend on StreamFragmentSize for download progress reporting
  • [Improvement] HTTPResponse.MinBufferSize renamed to MinReadBufferSize
  • [Improvement] VersionMajor and VersionMinor now set for HTTPResponse when it was created from a HTTP/2 connection too
  • [Improvement] Merged recent LitJson changes

HTTP/2

  • [New Feature] Implemented upload streaming and upload progress reporting

SignalR Core

  • [New Feature] Implemented MessagePack protocol using the Json & MessagePack Serialization Unity Asset Store package
  • [Improvement] Under WebGL built with Unity 2019.2 Uri's IsAbsoluteUri returns the wrong value
  • [Bugfix] Redirect uri's query parameters are removed while parsing and/or adding the negotiateVersion query param
  • [Bugfix] LongPolling now handles the handshake response

Websocket

  • [Bugfix] OnClose event called more than once

2.0.2 (2019-11-22)

General

  • [Bugfix] HostConnection's AddProtocol didn't set the new known protocol causing request processing delays in some cases
  • [Bugfix] Parts of the SignalR samples are back
  • [Bugfix] Fixed compile errors when specific plugin defines are added
  • [Improvement] Improved CookieJar's domain matching

HTTP/2

  • [New Feature] Added PingFrequency option to HTTPManager.HTTP2Settings
  • [Bugfix] Pong messages didn't send back the server's payload
  • [Bugfix] HTTP2Handler used HTTPManager.MaxConnectionIdleTime instead of HTTPManager.HTTP2Settings.MaxIdleTime

SignalR Core

  • [New Feature] LongPolling transport added
  • [New Feature] Automatic transport downgrade

2.0.1 (2019-11-17)

HTTP/2

  • [Bugfix] "host" header must not sent in a HTTP/2 request

General

  • [Bugfix] Request's Response can be null when the ConnectionHelper tries to determine whether the connection can be kept open

Socket.IO

  • [Bugfix] Fixed an error that thrown when the packet's payload contained unicode characters.
  • [Bugfix] Fixed error packet deserialization when the code field isn't an integer

SignalR Core

  • [Bugfix] Fixed compile errors when BESTHTTP_DISABLE_WEBSOCKET present
  • [New Feature] Added support for allowReconnect in the close message (ASP.Net 3.1 feature)

2.0.0 (2019-10-31)

Warning

This is a major release breaking backward compatibility with older releases. See the Upgrade Guide for more details!

General

  • [New Feature] Added Application-Layer Protocol Negotiation support to the BouncyCastle lib
  • [New Feature] HTTP/2 Support added
  • [New Feature] New HTTP2Settings property added to the HTTPManager class
  • [New Feature] Initial implementation of HTTP Alternate Services
  • [New Feature] Added support for Unity 2019.3's (experimental) Enter Play Mode options
  • [New Feature] Added Assembly Definition file to reduce recompile times
  • [Improvement] Rewrote threading to avoid race conditions and reduce locking by using concurrent queues and lightweight ReaderWriterLockSlims instead of lock blocks.
  • [Improvement] New online documentation
  • [Breaking change] Removed Statistics API
  • [Breaking change] Changed some BouncyCastle related class' namespace to avoid collition with other plugins and SDKs
  • [Breaking change] Rewrote Abort mechanism
  • [Breaking change] Minumum Unity version is now 2017.3
  • [Bugfix] When the plugin is forced to use url-encoded form with binary data, it will base64 encode the data first

HTTPRequest

  • [Breaking change] New easier to use http streaming API through the OnStreamingData event
  • [Breaking change] Renamed OnProgress to OnDownloadProgress
  • [Breaking change] Removed DisableRetry, use MaxRetries instead
  • [Breaking change] Removed Priority property
  • [Breaking change] Removed TryToMinimizeTCPLatency property
  • [Breaking change] Removed GetStreamedFragments function, use the new OnStreamingData event
  • [Breaking change] Removed HTTPFormUsage.RawJSon support

Server-Sent Events

  • [Improvement] Rewrote implementation to support Server-Sent Events over HTTP/2

SocketIO

  • [Improvement] Improved compatibility with newer WebAssembly runtime

Websocket

  • [Breaking change] Removed OnErrorDesc event
  • [Breaking change] OnError event now has a string parameter instead of an Exception

SignalR Core

  • [New Feature] Added automatic reconnection support through the new IRetryPolicy interface
  • [Improvement] Improved ASP.Net Core 3 compatibility
  • [Breaking change] Changed up and down streaming API