2.8.6 (2023-10-28)

General

  • [Bugfix] Issue-176 “Async await and json parse error = hanged Task”

Server-Sent Events

  • [Bugfix] Issue-168 Handle optional "content-type" header parameters other then the upgrade "text/event-stream".

WebSocket

  • [Improvement] Issue-175 Added code to stop any further event processing

2.8.5 (2023-07-12)

General

  • [Bugfix] Fixed expection under Unity 2023.1 using HTTPResponse’s DataAsTexture

HTTP/2

  • [Bugfix] Always generate window updates, even for closed streams, otherwise the global window for the whole connection could reach zero and the server would stop sending more DATA frames

Socket.IO 3+

  • [Bugfix] Issue-166 Fixed JsonDotNetParser not serializing ACK packets properly

SignalR Core

  • [Improvement] Try to reconnect when negotiation request fails

2.8.4 (2023-06-06)

General

  • [New Feature] Added IsMainThread() function to HTTPUpdateDelegator
  • [Bugfix] Fixed crash under android when ThreadingMode.Threaded is in use
  • [Bugfix] Use invariant version of ToLower
  • [Bugfix] Moved brotli decompressor usage under the BESTHTTP_ENABLE_BROTLI define

WebSocket

  • [Improvement] Always release back the header frame to the BufferPool.
  • [Bugfix] If there were a http/2 connection to the redirected wss:// address, no new implementation (OverHTTP1/OverHTTP2) got created and the old OverHTTP1 implementation treated the HTTP/2 response as an error. Now, when there’s a redirection, the request will not follow the redirection directly, but the websocket instance creates and uses a new implementation based on the new uri.
  • [Bugfix] Issue-154 Reworked header and fragmentation handling

Socket.IO 3+

  • [New Feature] Added OnIncomingPacket event.

SignalR Core

  • [Improvement] Issue-162 Added support for async functions
  • [Bugfix] Issue-158 Fixed exception handling for SendMessage and CancellationToken usage in Register calls
  • [Bugfix] Issue-161 Removed exception throwing in the On and Remove methods

2.8.3 (2023-02-06)

TLS

SignalR Core

  • [Bugfix] Issue-146 Exit early to prevent executing SendMessage when the connection is already cleaned up.

2.8.2 (2023-01-12)

General

  • [New Feature] Added StringBufferPool implementation and usage across the plugin.
  • [Improvement] Issue-141 Automatic Proxy Detection: Add an exception list when BypassProxyOnLocal is true
  • [Improvement] Added ProfilerMarkers around calls in HTTPManager.OnUpdate.
  • [Bugfix] Switching to threaded mode returned if no Setup() is called previously resulting in no OnUpdate call at all.
  • [Bugfix] Set HTTPRequest’s Response when reading from the cache. Otherwise OnStreamingData will be called with a null HTTPResponse object.
  • [Bugfix] Issue-141 Automatic Proxy Detection: fixed scheme checking in the FrameworkProxyDetector
  • [Bugfix] Due to Unity limitations, the plugin will not request Brotli encoded content with the Mono runtime under Android.

TLS

  • [Improvement] Further speed improvements using with BESTHTTP_WITH_BURST by utilising Burst’s Avx2, Sse2 and Neon instruction sets.
  • [Improvement] X509Name is immutable and wil cache ToString’s result again.
  • [Bugfix] Added a few empty files in place of deleted ones that caused compile errors.
  • [Bugfix] Use memory alignment-safe functions instead of reinterpret casts under Android.

HTTP/2

  • [Improvement] “te: trailes” header required by GRPC is now supported
  • [Bugfix] Issue-142 Fixed case where the sender thread didn’t slept as it should while waiting to send a new ping frame.

WebSocket

  • [Improvement] Will not mask the sent data if it’s sent over TLS (wss://).
  • [Improvement] When BESTHTTP_WITH_BURST is used, masking will try to use Avx2/Sse2 under X86 platforms and Neon under Arm to speed up masking.
  • [Improvement] Issue-143 Naming of WebSocket threads.
  • [Improvement] Upped default ping frequency value to 10 seconds from 1 second.
  • [Bugfix] Fixed a NullReferenceException in fragment generation.
  • [Bugfix] Issue-145 Fixed an issue in fragment generation where not all data sent to the server if the source data had an offset.

SocketIO 3+

  • [New Feature] Added JSON.NET parser implementation.
  • [Improvement] Added a constructor to the JsonDotNetParser to be able to pass a Newtonsoft.Json.JsonSerializerSettings to customize serializations.

SignalR Core

  • [Improvement] Added a constructor to the JsonDotNetEncoder to be able to pass a Newtonsoft.Json.JsonSerializerSettings to customize serializations.
  • [Bugfix] Fixed a case where the HubConnection wasn’t cleaned up properly.
  • [Bugfix] Fixed handshake parsing when the server sent it with regular messages.

2.8.1 (2022-11-16)

General

  • [Bugfix] Fixed compile error when API Compatibility Level was set to .NET Framework

2.8.0 (2022-11-16)

General

  • [New Feature] Experimental automatic proxy detection
  • [Improvement] Do not build proxy related code into WebGL builds.
  • [Improvement] Increased BufferPool.MaxPoolSize to 20Mb.
  • [Bugfix] Fixed case where a TCP connection might remain open.

TLS

  • [Improvement] Updated BouncyCastle to the latest version.
  • [Bugfix] Fixed Issue-123 (TLS decoding fails with bad_record_mac error).

HTTP

  • [New Feature] Issue-125 Support added for Brotli compression under Unity 2021.2 or newer builds.
  • [Improvement] Maximize download/upload events to one per frame to reduce overhead when slow framerate combined with hight download/upload events.

WebSocket

  • [New Feature] New SendAsBinary and SendAsText implementation to send BufferSegments.
  • [Improvement] Moved data fragmentation and extension negotiation to the send thread zeroing any overhead calling many Send method when sending large amount of data.
  • [Improvement] Reduced the number of data copying.
  • [Improvement] Masking the payload now can proccess 8 bytes per cycle instead of 4 bytes.

SignalR Core

SocketIO 3+

  • [Improvement] Reduced the number of data copying with the websocket transport.
  • [Improvement] MsgPackParser to try to avoid a lot of memory copy when used with large payloads, it computes an average payload length and allocates memory based on this instead of a fixed smaller value.
  • [Bugfix] Fixed case where callbacks added with ExpectAcknowledgement didn’t called when the sent data contained binary.

2.7.0 (2022-08-25)

General

  • [New Feature] Issue-115 HTTPManager.SetThreadingMode implementation.
  • [New Feature] Added new QUERY http method.
  • [Bugfix] LoggingContext now should generate a more unique hash for objects it’s bound to, generating less confusing verbose logs.
  • [Bugfix] Issue-117 Fixed compile errors when BESTHTTP_DISABLE_PROXY or BESTHTTP_DISABLE_CACHING are defined.

TLS

  • [New Feature] Encrypt/decrypt performance now can be improved with Burst! See the HTTPS documentation for more info.
  • [Improvement] Removed Il2CppSetOptions as they are not improved the performance as aticipated while they added some risk for runtime errors.
  • [Bugfix] Fixed race condition between ReadApplicationData and TestApplicationData calls.
  • [Bugfix] [TLS 1.3] Send CertificateRequestContext with the client certificate.

HTTP/1

  • [Bugfix] Issue-114 Store headers as received

HTTP/2

  • [Improvement] HTTP/2 stream will not send a window-update frame if received all data.
  • [Improvement] Maximized memory allocation to HTTPRequest.UploadChunkSize when uploading content instead of the remote server’s MAX_FRAME_SIZE settings as it can be quite large.

SocketIO 3+

  • [Bugfix] [MsgPackParser] will send null parameters correctly.

WebSocket

  • [New Feature] ISSUE-116 OnBinaryNoAlloc implementation. Receive binary messages without memory allocations!
  • [Improvement] ISSUE-116 If there’s no subscriber for the OnBinary event, no memory allocations will be made.

SignalR Core

  • [Bugfix] Fix for "Missing required property 'type'" errors caused by Managed Code Stripping.

2.6.3 (2022-07-07)

General

  • [New Feature] Added HTTPUpdateDelegator.SwapThreadingMode() function to switch between threaded and Unity’s main thread mode.
  • [Bugfix] In some cases ReadOnlyBufferedStream blocked indefinitely until new data arrived.
  • [Improvement] TcpClient will try to connect to IPv4 addresses first.

HTTP

  • [Bugfix] Don’t send a Content-Length (: 0) header if there’s an Upgrade header. Upgrade is set for websocket, and it might be not true that the client doesn’t send any bytes.
  • [Bugfix] Set Exception to null on Send() and Clear() calls
  • [Improvement] Added status code 303 as redirect code.

SocketIO 3+

  • [Bugfix] [MsgPackParser] no longer throws an exception after parsing an event that the client doesn’t subscribed to.
  • [Improvement] Websocket transport will send pings using its default setting.

SignalR Core

  • [Bugfix] Fixed case where the protocol tried to reconnect while the application is quitting.
  • [Bugfix] Fix for a case where the application is in the background and the (websocket) connection is closed, bringing the app foreground processes other messages (pings for example) first and errors out tring to send an answer instead of processing the close frame instead.
  • [Bugfix] Fixed case where rwLock dispose code might execute while calling transport. Send in SendMessage, while holding the lock.
  • [Improvement] Websocket transport will send pings using its default setting.

Websocket

  • [Improvement] Ping-pong mechanism moved to the sender thread, so a websocket connection will be kept alive in the background until threads are executed.

2.6.2 (2022-04-18)

TLS

  • [Bugfix] SslStream instance not set when HTTPManager.ClientCertificationProvider is null.

General

  • [Bugfix] [WebGL] Fixed tangling with unity’s webrequest module
  • [Improvement] [LitJson] Don’t try to set a dictionary’s property, add it as an element instead.
  • [Improvement] Add logging when connecting to an address.
  • [Improvement] Added warning for cases where the LastProcessedUri of the connectionEvent’s Srouce is null.

SocketIO 3+

  • [Improvement] Set options.ConnectWith to TransportTypes.WebSocket when the uri’s scheme starts with wss/ws

2.6.1 (2022-03-17)

General

  • [Improvement] Lowered the logging severity of RemoveConnection - Couldn't find connection! warning string.
  • [Bugfix] Fixed compile error when BESTHTTP_DISABLE_ALTERNATE_SSL is used.
  • [Bugfix] Fixed compile error when BESTHTTP_DISABLE_COOKIES is used.

HTTP/2

  • [Improvement] Lowered the logging severity of Skipping data sending as remote Window is ... warning string.

SignalR Core

  • [Bugfix] MessagePackCSharpProtocol now uses MessagePackSerializer’s IL2CPP friendly serialization/deserialization.

2.6.0 (2022-03-03)

This release contains breaking changes, check out the Upgrade Guide for help.

TLS

  • [New Feature] Migrated to BouncyCastles’s new TLS api
  • [New Feature] Added support for TLS 1.3, the supported minimum TLS version is now TLS 1.2
  • [New Feature] Added support for Server-initiated TLS renegotiation
  • [New Feature] Before choosing a free connection from the pool, the connection going to be tested. If the server sent a TLS alert notify of closing the connection, the plugin also closes the pooled connection and not going to try to use it.
  • [Improvement] Removed TLS related functions and properties from the HTTPRequest
  • [Improvement] More memory allocation optimizations
  • [Improvement] Removed the now unused crypto/tls folder

General

  • [Improvement] HTTPRequest’s OnHeadersReceived now receives the headers as its parameter. This way regular and trailing headers can be distinguish.
  • [Improvement] Added logging with context to Connection, Protocol and Plugin events.
  • [Improvement] When a HTTPRequest’s IsKeepAlive is set to false and a new connection would open, the plugin not going to try to negotiate a HTTP/2 connection as it would be kept open even longer.
  • [Improvement] Removed WebGL specific IO service implementation as it’s uses the default one since v2.5.3

HTTP/1

  • [Bugfix] Fixed case where redirecting and closing the connection resulted in only redirecting the request but the connection stayed open.

HTTP/2

  • [New Feature] HTTP2PluginSettings has a new Timeout field: the time to wait for a pong answer from the server before treating the connection as broken.
  • [Improvement] When the HTTPRequest’s IsKeepAlive is set to false, the plugin not going to try to negotiate a HTTP/2 connection as it would kept alive no matter what’s the value of the initiator HTTPRequest’s IsKeepAlive.
  • [Improvement] Lowered HTTP2PluginSettings.PingFrequency to send out ping requests more frequently.
  • [Bugfix] Don’t send ‘proxy-‘ headers with the request
  • [Bugfix] [ISSUE-85] HPACK encoder’s DecodeString didn’t handled the case where the string length is 0

SocketIO 3+

  • [Improvement] Improved debug logging of outgoing packets

SignalR Core

WebSocket

  • [Bugfix] [WebGL] [ISSUE-88] Fixed case where sending textual message containing null(\0) characters failed because Emscripten’s UTF8ToString expects a null-terminated string and doesn’t include it in the final string.

2.5.4 (2021-12-27)

General

  • [Bugfix] Call ResetSetups only when run in the editor
  • [Bugfix] [ISSUE-77] Potential managed memory leak with HTTP2Stream disposal
  • [Bugfix] ThreadedLogger: Empty cached StringBuilder on thread exit
  • [Improvement] Improved compatibility with High Managed Stripping Level
  • [Improvement] Added a new log entry when a new request event is added to the event queue
  • [Improvement] Removed per-field content-length header from the multipart/form-data implementations

TLS

  • [Improvement] Updated BouncyCastle to the latest version

SocketIO 3+

  • [Bugfix] Fixed client acknowledgment sending

SignalR Core

  • [Improvement] Send and invoke functions are now thread safe
  • [Improvement] Subscribing to a server-sent event now throws and exception if the connection’s state is equal or larger than CloseInitiated

Examples

  • [Bugfix] Fixed BufferPoolMemoryStream usage in MultipartFormDataStream
  • [Bugfix] Change root sample url
  • [Improvement] Changed the WebSocket demo’s url to a working one

2.5.3 (2021-10-18)

General

  • [Bugfix] Fixed race condition in the timing api that could result in an exception
  • [Bugfix] Resend request with proxy authtentication header when it’s a transparent proxy. Possible workaround for waiting for chunked encoded proxy response
  • [Bugfix] Possible fix of a race condition in the BufferPool implementation
  • [Bugfix] [ISSUE-75] HTTP2Response uses int for contentLength instead of long so doesn’t track large (2.1GB+) files
  • [Improvement] Dispose implementation overhaul
  • [Improvement] Added support for relative redirect urls
  • [Improvement] Logging out a BufferSegment now going to log out (part of) the data too
  • [Improvement] [WebGL] Add Set-Cookie header only when its value isn’t empty
  • [Improvement] [WebGL] Use the default IO service under WebGL too, but explicitly disable the caching service and cookie saving
  • [Improvement] Removed non-used ConcurrentStack file
  • [Improvement] Don’t keep an HTTP1 connection in the connection pool if the last processed request/response returned max=0 in a Keep-Alive header

SignalR Core

  • [Bugfix] [Long-Polling transport] Removed fake ping message as it’s triggered a client-sent one, that triggered a new fake one, etc.
  • [Improvement] [MessagePackProtocol] Added support for parameterless callbacks

Websocket

  • [Bugfix] [Long-Polling transport] Use WebSocket’s MaxFragmentSize in WebSocketResponse

Socket.IO 3

  • [Bugfix] Call Dispose on StringReaders

2.5.2 (2021-08-02)

General

  • [Bugfix] Moved documentation from readthedocs to github pages
  • [Bugfix] [WebGL] In some cases XHR_Send called twice
  • [Improvement] Return early if base request is cancelled instead of throwing an exception
  • [Improvement] Change TCP Client’s buffer sizes only when a custom value is set in the HTTPManager
  • [Improvement] Sample URL changes

HTTP/2

  • [Bugfix] Possible bugfix for a case where Process is called for a request while the handler already shutting down resulting in a NullRef. exception
  • [Bugfix] GOAWAY frame’s additional data read from the wrong position of the buffer

SignalR Core

  • [Improvement] Append access_token query param only if there’s a negotiated access token
  • [Bugfix] Set connectionStartedAt on a reconnect attempt too to avoid an outdated value cancelling authentication requests

SocketIO 3

  • [Improvement] [Default Json parser] Catch and log exception when doing ReadParameters

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 SocketOptionsAdditionalQueryParams

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)

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