dox_http_native 3.2.5
dox_http_native: ^3.2.5 copied to clipboard
Fast native HTTP/1.1 server for Dart and the Dox framework. Rust parses HTTP, your handlers stay in Dart. Implements the dart:io HttpServer API.
3.2.5 #
- Tests: the HTTP server tests of the Dart SDK (
tests/standalone/io) now run against this server, intest/dart_io/. - Fix: a client that sent more than 64 pipelined requests and then closed its send side got answers for only the first 64. The server closed the connection and dropped the requests that still waited in its read buffer. Now it reads on and answers all of them.
- Fix: a client that closed its connection in the middle of a request body kept the connection open until
bodyTimeout(120 seconds by default), and a gracefulclose()waited for it. Now the connection closes at once, as no handler saw the request. - Fix:
requestedUriwas wrong for a request line with an absolute URI (GET http://example.com/ HTTP/1.1). It gavehttp://example.comhttp//example.com/. Now it gives the URI of the request line. - Fix: a chunked request body whose chunk size line was empty (
\r\n) or started with;was read as the last chunk. Now the request gets400. A proxy that reads such a line as an error or skips it saw another end of the body, which is a request smuggling risk. - Fix (security): a chunked request body with a control byte in a chunk size line or in a trailer was accepted, for example a lone
\nin a chunk extension or in a trailer line. A proxy that ends the line at the lone\nsees another end of the body. This is a request smuggling risk (the same type as CVE-2025-55315). Now the request gets400. A tab is permitted. - Fix: a handler that set a
Dateheader made an answer with twoDateheaders (RFC 9110 allows one). The server now always sends its ownDate, as it already did forContent-LengthandTransfer-Encoding. - Fix:
response.headers.clear()did not resetchunkedTransferEncoding. - Fix:
response.addandwebSocket.addwith a list that holds a value outside 0 to 255 (for example[256]or aUint16List) sent other bytes (256 became 0). Now they throw anArgumentError, as dart:io does. AUint8Listis not checked. - Fix: the answer to a
HEADrequest with acontentLengththat the handler set, and no body, hadcontent-length: 0. Now it has the length that the handler set, as for dart:io. This also applies to HTTP/2. - Fix:
NativeWebSocket.upgrade(protocol:)sent the protocol also when the client did not offer it (RFC 6455 section 4.2.2). Now, as in dart:io, the request gets500andupgradethrows aWebSocketException. When the client offers no protocol, the answer has no protocol. - Fix: when the stream of
addStreamfailed before the head went out, the request got no answer. A laterclose()sent the part of the body that came before the error, as a200. Now the request gets500with no body.
3.2.4 #
- New releases have the tag
dox_http_native-v<version>, because the repository now holds more than one package. The build hook downloads the library from this tag first. When it is not there, the hook uses the old tag formv<version>. - The ready-built Linux libraries do not need
libgcc_s.so.1. They need only glibc 2.34 or newer, as before. AFROM scratchDocker image with the Dart/runtime/files does not need a copy oflibgcc_s.so.1for this package. The release build now links the Linux libraries withcargo zigbuild, and CI does a check of each library.
3.2.3 #
- Faster: lower tail latency, and more requests a second when the server has idle CPU cores. After the server sends a whole answer and no request is open, it now waits up to 1 ms for the next requests in the same call. Before, it gave the sockets to the idle thread at once, and each return to Dart cost 2 thread wake-ups. Measured on 4 server cores with 64 connections: p99 goes from 2.4 ms to 0.3 ms, and requests a second go up 1% to 6%. With 256 connections, p99 goes from 2.8 ms to approximately 1 ms. On 2 server cores, the numbers do not change. There is no wait while a request or a streamed answer is open. A WebSocket message and a part of a streamed answer do not start a wait. The waits between 2 turns of the event loop are 1 ms in total, plus at most one more wait. Thus other work of the isolate (for example a timer) can start up to 2 ms later.
- Fix: a gzip answer did not go out until other traffic came, when the gzip thread finished while the server waited for socket events. The wait used the wake-up of the gzip thread, and then the server did not look for the finished answer. Now the server sends the answer in the same call.
3.2.2 #
- ABI version 10 (was 9).
dox_bindhas 4 new arguments:http2,maxConcurrentStreams,http2ResetBurstandhttp2ResetRate. A library of an older version does not load. From pub.dev, the correct library downloads automatically. In a git checkout, runcargo build --releaseinnative/. - New: HTTP/2 over plain TCP (h2c with prior knowledge). It is off by default. When it is off, nothing changes.
NativeHttpServer.bind(port, http2: true)makes the same port speak HTTP/1.1 and HTTP/2. A connection that starts with the HTTP/2 preface is HTTP/2. Handlers stay the same.request.protocolVersionis2.0, and answers go out in any order.maxConcurrentStreams(default 250) caps the open requests of one connection. More requests getREFUSED_STREAM. A gracefulclose()sends GOAWAY and lets open streams finish. An HTTP/2 connection with no open stream foridleTimeoutgets GOAWAY before it closes. A PING does not keep it open.- Request bodies: a body is read whole before the handler gets it, as on HTTP/1.1, with the same
maxBodySize,maxMultipartSizeandbodyTimeout. A body over the limit gets413, and a slow body gets408. Only that stream ends. The other streams and the connection continue. The server gives the flow-control window back as the body comes, so a big upload does not stall. Acontent-lengththat does not match the body is an error. Request trailers are read and dropped. - Streamed answers (
addStream,flush) go out as DATA frames under the client's windows, with the same backpressure as on HTTP/1.1. A streamed answer that fails resets only its stream. - gRPC support: a request with
content-type: application/grpc(orapplication/grpc+protoand similar) reaches the handler when its headers come, withrequest.isStreamedtrue. Its body then comes in parts while the handler runs. The client can send more only after the handler took the parts. A slow or paused handler, or one that does not read, holds the client back at the 1 MiB stream window. Such a body has no size limit and no body timeout. When the client resets the stream or the connection stops, the body stream ends with anHttpException. When the handler answers before the request body ended, the client getsRST_STREAM NO_ERROR. - New
NativeResponse.trailers: headers sent after the body, for examplegrpc-status. They go out on HTTP/2 only. On HTTP/1.1 they are dropped. - Unread gRPC bodies do not hold the connection flow-control window. Only the stream window waits for the handler. The bytes that wait for handlers are capped at 16 MiB per connection. Over the cap, the stream with the most unread bytes is reset (
RST_STREAM ENHANCE_YOUR_CALM, gRPCRESOURCE_EXHAUSTED). A handler that reads its body does not come near the cap. - Answer bytes that wait for a client that does not read are capped at 32 MiB per connection. Over the cap, new streams get
REFUSED_STREAMuntil the client reads. - A request header block over 16 KiB (encoded) gets
431on its stream, and the connection continues. Only a block over 64 KiB closes the connection. A:paththat does not start with/is a malformed request (RST_STREAM PROTOCOL_ERROR).*is permitted forOPTIONS.
- New: HTTP/2 flood limits.
- Resets (Rapid Reset, CVE-2023-44487 and CVE-2025-8671): over
http2ResetRateresets a second (default 100) after a burst ofhttp2ResetBurst(default 2 xmaxConcurrentStreams, minimum 1000), the connection drains. It sends GOAWAYNO_ERROR, the open requests still get their answers, and new streams getREFUSED_STREAM. A proxy (for example Caddy or Envoy over h2c) then sends them again on a new connection. If the resets continue for one more burst, the connection closes with GOAWAYENHANCE_YOUR_CALM. Streams that the server resets for a bad frame also count. - Each answer with a body gives back half a reset, so a busy gRPC client whose calls go over their deadline is not cut. Answers with no body (for example a gRPC error) give nothing back. A
RST_STREAMfor a stream that is already closed costs nothing, up to one burst a second. - Over 100 SETTINGS or 100 PINGs a second, over 10 SETTINGS or 100 PINGs with no read answer, or over 100 frames in a row with no work (for example empty DATA or CONTINUATION) close the connection at once with GOAWAY
ENHANCE_YOUR_CALM. PINGs between DATA frames do not count. Protocol errors also close the connection at once. - A Dart handler can not be stopped. A request that the client reset counts toward
maxConcurrentStreamsuntil its handler answers, so fast resets can not pile up work in Dart. A handler that does not end stops counting after 30 seconds. A streamed answer that started counts until its last part. A refusal that only lost handlers cause costs a quarter of a reset. - A frame on a stream that the client reset is a
STREAM_CLOSEDerror, as RFC 9113 says.
- Resets (Rapid Reset, CVE-2023-44487 and CVE-2025-8671): over
- New (internal): an HPACK decoder and encoder (RFC 7541) for HTTP/2 header compression. Tests use all RFC 7541 Appendix C examples. New fuzz targets
hpackandh2_conn. The h2spec conformance suite (strict) runs in CI, and the HTTP/1.1 tests also run with HTTP/2 on. - Faster streamed answers: parts that a handler makes together now go out in one write, not one write per part. A part is sent in the next event-loop turn. A whole answer, a stream end or a WebSocket message that comes while a part waits is also sent one event-loop turn later.
- New:
NativeResponse.hasRoom. It is true when a streamed answer started and Rust has room for more, soflush()would complete at once.
3.2.1 #
-
Fix (leak): a client that closed its connection while its request still waited for an answer kept the connection, its socket and its state for ever when the handler never answered (eg. a database call with no timeout). The same happened to a streamed answer (eg. server-sent events) that wrote nothing after the client left. Now, when the client closed its side and nothing was written for the idle time (
idleTimeout, 30 seconds by default), the connection closes. A client that only closed its sending side and still waits gets its answer when it comes within that time. A late answer is dropped. This also holds for a connection that reads nothing while it waits (eg. a WebSocket upgrade request, or 64 open requests): the server sees the close in the poll. Note: a client that closed only its sending side (a half-close) now waits at mostidleTimeoutfor its answer. RaiseidleTimeoutwhen such clients call slow handlers. -
Fix (leak): when the client of a streamed answer leaves,
addStreamnow cancels its source at once. Before, it waited for the next part of the source, so a quiet source (eg. server-sent events with no news) stayed subscribed. -
Fix:
NativeWebSocket.pingIntervaldid nothing. Now it works like indart:io: when the client sent nothing for that long, the server sends a ping. When the client still sends nothing for one more interval, the socket closes with 1001 (going away). This finds clients that vanished with no close (eg. a phone that lost its network). Default: off (null), as before. -
New: accepted sockets get TCP keep-alive: after 60 seconds with no traffic the OS checks the client every 10 seconds. After 6 checks with no answer (about 2 minutes) the connection is dead and closes. A live client always answers these checks, so nothing changes for it. It is set once on the listening socket where accepted sockets inherit it (Linux, and all but the idle time on macOS), so an accept costs few extra system calls.
-
Fix (leak):
response.donenever completed when the client left before the response was closed. So a handler that writes server-sent events withresponse.add()from its own timer kept the timer for ever. Nowdonecompletes (with no error) when the client is gone. Writes after that are dropped, as before. This also holds whendoneis first read after the client left. Only responses whosedoneis used beforeclose()are tracked, so normal requests cost nothing more. -
Fix:
response.flush()did nothing, soadd()plusflush()(eg. server-sent events from a timer) sent nothing untilclose(). Now it works like indart:io: the first flush sends the head and the bytes so far, and the body goes out in parts (chunked, or up to thecontentLengthwhen set). Later writes go out at once. It completes when the server has room for more, likeaddStream. An error (eg. more bytes than the content length) fails its Future. Once the head is out (a flush, oraddStreampast 64 KB), a change of a header,statusCodeorreasonPhraseis ignored, and a warning is logged once to stderr. A flush that waits for room goes on when the response is closed. Afterclose(), after the client left, or whileaddStreamruns, flush does nothing. A response that never calls flush is sent as before. -
New:
NativeResponse.headSent. It is true once the status and the headers went out (a flush, oraddStreampast 64 KB). Then an error handler can not send an error page any more. -
Fix: a streamed answer (
addStreampast 64 KB, or a flush) with status 1xx, 204 or 304 wrote a chunk end after the head. That broke the next answer on a keep-alive connection. Now only the head goes out, like for HEAD. -
New:
NativeResponse.end(). It sends the response likeclose(), but makes no Future.close()makes a Future and a microtask per response. When the caller does not use that Future, it only keeps the request and its batch of bytes alive a bit longer, so under load the heap grows. Useend()when you do not await the response.close()works the same as before. -
Memory: each connection kept a 16 KB read buffer for its whole life. With 512 keep-alive connections that is 8 MB. Now all connections of one core read into one shared buffer. A connection keeps its own buffer only for a part of a request that did not come whole yet.
-
Memory: after a big answer (up to 1 MB), a keep-alive connection kept a write buffer that big. Now a write buffer over 64 KB is freed once it is written.
-
Memory: a request that is still open after its batch (an async handler, a stream, a WebSocket) kept the whole batch copy alive (up to 256 KB or more). Now such a request copies only its own headers and body bytes. Requests answered right away copy nothing.
-
Speed: request headers now scan the raw bytes for the first 4 lookups (was 1) before they parse all headers into a map. A scan that finds nothing makes no object.
3.2.0 #
- Fix: each download try of the native library now has one time limit of 60 s, from connect to the last byte. Before, there was no limit while waiting for the answer, and the 60 s limit for the body only counted the gap between two chunks. So a slow server could hang the build for a long time. Now 3 tries take about 3 minutes at most.
- Fix: a chunked body with a chunk size line over 1024 bytes (with its extensions) now always gets
400. Before, it got400only when the line came in small reads. When the whole line came in one read, it passed. A trailer over 16 KB now always gets431for the same reason. Found by the new fuzz tests. - New: fuzz tests (cargo-fuzz) for the request parser and the chunked body reader, in
native/fuzz/. CI runs them whennative/changes. - Fix: a method like
GOT,PUXorPOOLcame to the app asGET,PUTorPOST. Dart checked only the length and the first byte of the method. Now it checks every byte. - Fix:
Transfer-Encodingin an HTTP/1.0 request, or in two headers, now gets400(RFC 9112). Before, the body was read as chunked. A proxy in front could read the body another way (request smuggling). - Fix:
Connection: closein one header andkeep-alivein another now closes the connection. Before, the last header won. - Fix: a WebSocket key or version sent twice no longer upgrades (RFC 6455). A key that is not base64 of 16 bytes (24 characters, eg. an empty key) no longer upgrades either. These requests go to the app as normal requests.
websocketin anyUpgradeheader and100-continuein anyExpectheader now count, not only in the last one. - Fix: only
multipart/form-datagets the multipart body limit. Before, any content type with the textform-datain it got it (eg.multipart/x-form-data). - New: the fuzz tests now check the request record for Dart and the body framing against a reference, and fuzz a whole connection (
conn) and the cookie decryption (aead_open).
3.0.4 #
- Fix: the build hook now tries the download of the native library up to 3 times (waits 1 s, then 3 s). Before, one bad answer from GitHub (eg. 503 or 504) meant no native library, and the app stopped at start. It tries again on a 5xx or 429 status, a connection error or timeout, and a wrong sha256. A 404 is not tried again. If all 3 tries fail, nothing changes: the hook falls back to cargo or adds no library.
3.0.3 #
- New:
NativeHttpServer.bind(idleTimeout: ...). A keep-alive connection with no new request for this time closes. A request head must also come whole in this time. Default: 30 seconds, as before. Behind a load balancer, set it longer than the idle timeout of the balancer (eg. 65 seconds for AWS ALB, which keeps connections for 60 seconds). Else the server may close a connection the balancer still uses, and clients get 502. - The
idleTimeoutfield now shows the value given tobind. Setting it later still has no effect, and it stays deprecated. - Fix: with
autoCompress, answers that could be gzipped now sendVary: Accept-Encoding, so a shared cache does not give a gzip body to a client that can not read it. - Fix:
Accept-Encoding: gzip;q=0means "no gzip", and is now read that way. - Fix: bodies that are compressed already (images, audio, video, zip, gz, woff and so on) are not gzipped again.
image/svg+xmlis still gzipped. - Native ABI 9 (
dox_bindtakes the idle timeout). The build hook gets the new native library.
3.0.2 #
- New:
AesGcm.sealandAesGcm.open, AES-256-GCM in Rust. It uses the AES and carry-less multiply instructions of the CPU. dox_core uses it for encrypted cookies andAESEncryptor. One cookie took about 100 µs in pure Dart (pointycastle), and now takes under a few µs. The layout (nonce + ciphertext + tag) is the same, so values made before still open. - Native ABI 8 (two new FFI calls). The build hook gets the new native library.
3.0.1 #
- Fix (Linux): a client that sent its request and then closed its sending side never had its connection closed. The close came in the same event as the request, and the server waited for a new event that never came. Now the server keeps the close from the event and reads on until it sees it. Test: a client that stops sending still gets its answer, and the connection closes.
- Fix: an answer that comes later (eg. after a database query) could wait up to seconds. The idle helper thread held the sockets, and Dart had to wait until the helper gave them back. Now the helper only watches the poll file (epoll or kqueue) and never holds the sockets, so Dart never waits for it. Tests: answers after a reply from another isolate, after timers of different lengths, a long async task next to fast requests, and a long synchronous task.
- Perf: one thread per isolate. The socket work (accept, read, parse, write) now runs on the isolate's own thread, in a loop of FFI calls (
dox_run). Before, each isolate had its own Rust network thread, and every request and answer went from one thread to the other. A small helper thread now only watches the sockets while the isolate is idle, and wakes it when a request comes. - All features stay the same: WebSocket (now the sync
tungstenitecrate), streamed answers, big bodies without a copy, gzip (on a helper thread),Expect: 100-continue,400/413/431/408, lingering close, gracefulclose()andclose(force: true). - New: at most 64 requests of one connection wait for an answer. Then the server stops reading that connection until answers go out, so one client can not fill the memory with pipelined requests.
- New: a request head must arrive within 30 seconds, and a connection with no request for 30 seconds is closed (like hyper before).
- New: a request with both
Content-LengthandTransfer-Encoding: chunkedgets400. ATransfer-Encodingother thanchunkedgets501. - Removed: the hyper and tokio server and the
DOX_HTTP_THREAD=sharedsetting. - New:
NativeHttpServer.bind(maxConnections: ...). At the limit the server stops accepting until a connection closes. Default: no limit. - Breaking: native ABI 7 (new FFI calls, the big bodies come as native memory with a finalizer,
dox_bindtakes the connection limit). The build hook gets the new native library.
Security #
- A WebSocket client that sent ping frames without end held the isolate, so other requests waited for seconds. Now one call reads at most 256 KB of one WebSocket, and each connection gets one turn per call.
- A WebSocket client that sent pings and never read the pongs made memory grow without limit. Now the server stops reading its frames while more than 256 KB waits to be written.
- A client that pipelined requests and never read the answers made memory grow without limit. Now the server stops reading its requests while 1 MB of answers waits.
- A client that never read its HTTP answer kept the connection open forever. Now a write with no progress for 30 seconds closes it.
- A streamed answer with a wrong
contentLengthcould look like two answers to the client (response desync). Now Rust counts the bytes and closes the connection on a mismatch. In Dart, likedart:io,add()throws when the body passes the length, andclose()fails when it is shorter. - When the isolate died while it owned the sockets, the port stayed open and clients waited forever. Now the helper thread checks every 100 ms that the isolate lives, and closes the server when it is gone.
headers.contentTypewith a line break in a part could add a header. Now it throws aFormatException.Content-Lengthtook+5and other white space. Now only ASCII digits pass, else400.- An idle connection no longer holds a 16 KB read buffer.
- The idle time of a keep-alive connection now counts from its last answer, not its last request.
- A huge
bodyTimeoutno longer overflows the clock (it is cut to one year). A port out of range throws anArgumentError. - A raw UTF-8 byte in the request target now reaches
req.urias%XXof that byte, not as Latin-1 text.
3.0.0 #
- README: streamed bodies (over 64 KB with
addStream) are supported. The build hook has 4 steps, not 3.
3.0.0-alpha.8 #
- Perf: pipelined requests are faster. Before, hyper served the requests of one connection one at a time. So 16 pipelined requests needed 16 trips to Dart, one after the other, and 16 writes. Now Rust reads the pipelined GET and HEAD requests ahead and sends them to Dart in the same batch. The answers still go out in order, and the ones that are ready go out in one write. A request with a body, a chunked body, an upgrade or
Connection: closestops the read ahead, and hyper serves the rest alone like before. - Fix:
headers.set()andheaders.add()with a bad value (eg. a line break) threw, butset()had already removed the old value. Now all values are checked first, so a bad value leaves the headers unchanged.
3.0.0-alpha.7 #
-
The package moved to its own repository: https://github.com/dartondox/dox-http-native. The ready-built libraries are on its releases (tag
v<version>). -
New: a streamed response (
addStream, eg. a file or a download) over 64 KB goes out in parts. Before, the whole body was kept in memory untilclose(), and the client got nothing until then. Now the client gets the first bytes early, and at most 1 MB waits in Rust. Dart reads more only when the client has read what was sent. When the client leaves,addStreamstops reading the source. A small response still goes out in one piece. A streamed response withcontentLengthset sendsContent-Length, else it is chunked. -
Perf: a request body of 64 KB or more goes to Dart without a copy (external typed data). Before, it was copied 3 times.
-
Perf:
compress: truegzips on a Rust thread, not on the isolate. Same output (gzip, default level). A streamed response is not compressed. -
Perf: a response with the default headers and one content type (eg. JSON) copies no headers, and its header bytes are cached.
-
Perf: request headers are parsed into a map on the second lookup, not scanned again and again.
-
Perf: a request path with no query skips the full
Uri.parse. Rust takes the lock of the answers once per batch. -
Breaking: native ABI 6 (streamed body records, gzip flag, big bodies as their own part of the message). The build hook gets the new native library.
-
New: WebSocket upgrade on the native server.
NativeWebSocket.upgrade(request, protocol: ..., maxMessageSize: ...)accepts it and gives adart:ioWebSocket. Rust (tokio-tungstenite) speaks the protocol: ping and pong, the close handshake, the UTF-8 check and the size limit (a bigger message closes with1009). Compression is never agreed.NativeWebSocket.isUpgradeRequest(request)tells if a request asks for one. -
On a graceful
close(), open WebSockets get close code1001. -
WebSocket limits, so a slow client or a busy isolate can not make memory grow forever:
- Messages to a client wait in a queue. Over 4 times
maxMessageSize(at least 1 MiB) the socket closes with1008(policy violation). - A message that can not be sent in 30 seconds drops the socket (
1006). The close handshake (our close frame and the answer) has 5 seconds in all, then the socket is dropped (1006). - When Dart has more than 8 MiB of client messages not yet handled, Rust stops reading from WebSocket clients until it catches up. No message is lost. HTTP is not paused.
- Messages to a client wait in a queue. Over 4 times
-
New:
NativeHttpServer.ensureAvailable()throws an error that says why the library did not load and how to fix it.bindthrows the same error. -
Breaking: native ABI 5 (new WebSocket records, and an ack record from Dart). The build hook gets the new native library.
-
Breaking: Dox has no
dart:ioserver any more. When this library does not load, Dox stops at start with the reason. -
Security: a multipart form may be up to
maxMultipartSizebytes (newbindoption, defaultmaxBodySize). Any other body, eg. JSON, raw or text, is limited tomaxBodySize. Dox passes its own two limits, so a JSON body over 10 MB now gets413from Rust. -
Security: a body with a too big
Content-LengthandExpect: 100-continuegets413at once. WithoutExpect, Rust reads and drops the body (up to 64 MB more, no memory kept), then sends413, so the client sees the413and not a connection reset. -
Security: Rust no longer reserves memory from the client
Content-Length(at most 64 KB up front). -
Security: new
bindoptionbodyTimeout(default 120 seconds). It is the idle time with no body bytes: a client that sends nothing for that long gets408. A slow but steady upload is fine. -
Native ABI 4 (
dox_starttakes the multipart limit and the body timeout). Needs a new native library build. -
Security: response headers now refuse bad input with a
FormatException, likedart:io. A header name must be a token. A header value must not hold a line break or other control byte. Before, a\nin a value (or a char like\u010A, written as its low byte) added one more header, eg.Set-Cookie, when an app put request input in a header. The same check now runs onserverHeaderand on each cookie when the response closes, becauseCookiedoes not check its domain.
3.0.0-alpha.6 #
- Version bump only, to match the other packages.
3.0.0-alpha.5 #
- New:
NativeHttpServer.bind(port, address: ...)listens on one host, likeHttpServer.bind. AnInternetAddressor a host name. With no address it listens on all interfaces, as before.server.addressis the real address. - Fix:
close()never finished when nobody calledlisten()on the server. - Native ABI 3 (
dox_starttakes the host). Needs a new native library build. Until the next release, the build hook builds it with cargo. - New:
close()is graceful, likedart:io. The server stops taking connections at once, each open connection closes after its current answer, and the future completes when all are closed.close(force: true)closes every connection at once.
3.0.0-alpha.4 #
- Version bump only, to match the other packages.
3.0.0-alpha.3 #
DOX_HTTP_THREAD=sharedruns onedox-httpthread for all isolates. Default is still one thread per isolate, which measured faster.- Less work per request: request headers are read one name at a time, answers are not copied again in Rust, one wake per answer batch.
- Native ABI 2 (new header layout in the request record). Needs a new native library build.
3.0.0-alpha.2 #
- First release.
- Native HTTP/1.1 server: Rust (hyper, tokio) owns the sockets and parses HTTP. Handlers stay in Dart.
- Implements the
dart:ioHttpServer,HttpRequestandHttpResponseAPI, so code written fordart:ioworks unchanged. - One server per isolate on the same port (
SO_REUSEPORTon Linux and macOS). - 400 for bad requests, 431 for big headers, 413 for big bodies.
- The build hook downloads a ready-built library. No Rust needed.