iodine 0.7.60 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +15 -0
- data/.rspec +1 -0
- data/.yardopts +1 -3
- data/CHANGELOG.md +132 -12
- data/Gemfile +5 -7
- data/LICENSE.txt +1 -1
- data/README.md +147 -671
- data/Rakefile +9 -16
- data/examples/chatroom.nru +9 -0
- data/examples/client +74 -0
- data/examples/config-hello.nru +9 -0
- data/examples/config-hello.ru +11 -0
- data/examples/config-hijack.ru +13 -0
- data/examples/config-shootout.ru +43 -0
- data/examples/config.nru +120 -0
- data/examples/config.rb +37 -0
- data/examples/config.ru +42 -53
- data/examples/fake +24 -0
- data/examples/hello_neorack +137 -0
- data/examples/routes.nru +29 -0
- data/examples/routes.ru +42 -0
- data/exe/iodine +218 -258
- data/ext/iodine/extconf.rb +27 -100
- data/ext/iodine/fio-stl.h +128336 -0
- data/ext/iodine/fio-stl.md +26396 -0
- data/ext/iodine/iodine.c +213 -1393
- data/ext/iodine/iodine.h +250 -55
- data/ext/iodine/iodine_arg_helper.h +329 -0
- data/ext/iodine/iodine_caller.h +234 -25
- data/ext/iodine/iodine_cli.h +434 -0
- data/ext/iodine/iodine_compression.h +312 -0
- data/ext/iodine/iodine_connection.h +3484 -34
- data/ext/iodine/iodine_core.h +363 -0
- data/ext/iodine/iodine_crypto.h +1441 -0
- data/ext/iodine/iodine_defer.h +225 -4
- data/ext/iodine/iodine_json.h +738 -4
- data/ext/iodine/iodine_listener.h +263 -0
- data/ext/iodine/iodine_log.h +297 -0
- data/ext/iodine/iodine_minimap.h +543 -0
- data/ext/iodine/iodine_mustache.h +461 -4
- data/ext/iodine/iodine_pubsub_eng.h +729 -0
- data/ext/iodine/iodine_pubsub_history.h +547 -0
- data/ext/iodine/iodine_pubsub_msg.h +228 -0
- data/ext/iodine/iodine_redis.h +322 -0
- data/ext/iodine/iodine_store.h +418 -16
- data/ext/iodine/iodine_threads.h +279 -0
- data/ext/iodine/iodine_tls.h +515 -6
- data/ext/iodine/iodine_utils.h +923 -0
- data/iodine.gemspec +37 -42
- data/lib/iodine/benchmark.rb +1690 -0
- data/lib/iodine/documentation.rb +3085 -0
- data/lib/iodine/version.rb +17 -1
- data/lib/iodine.rb +54 -255
- data/logo.svg +36 -0
- data/mustache.md +55 -0
- data/sig/iodine.rbs +4 -0
- metadata +58 -184
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -40
- data/.github/workflows/ruby.yml +0 -42
- data/.gitignore +0 -21
- data/LIMITS.md +0 -41
- data/SPEC-PubSub-Draft.md +0 -159
- data/SPEC-WebSocket-Draft.md +0 -239
- data/bin/console +0 -22
- data/bin/info.md +0 -353
- data/bin/mustache_bench.rb +0 -100
- data/bin/poc/Gemfile.lock +0 -23
- data/bin/poc/README.md +0 -37
- data/bin/poc/config.ru +0 -66
- data/bin/poc/gemfile +0 -1
- data/bin/poc/www/index.html +0 -57
- data/examples/async_task.ru +0 -92
- data/examples/bates/README.md +0 -3
- data/examples/bates/config.ru +0 -342
- data/examples/bates/david+bold.pdf +0 -0
- data/examples/bates/public/drop-pdf.png +0 -0
- data/examples/bates/public/index.html +0 -600
- data/examples/echo.ru +0 -59
- data/examples/etag.ru +0 -16
- data/examples/hello.ru +0 -29
- data/examples/pubsub_engine.ru +0 -81
- data/examples/rack3.ru +0 -12
- data/examples/redis.ru +0 -70
- data/examples/shootout.ru +0 -73
- data/examples/sub-protocols.ru +0 -90
- data/examples/tcp_client.rb +0 -66
- data/examples/x-sendfile.ru +0 -14
- data/ext/iodine/fio.c +0 -11995
- data/ext/iodine/fio.h +0 -6371
- data/ext/iodine/fio_cli.c +0 -431
- data/ext/iodine/fio_cli.h +0 -189
- data/ext/iodine/fio_json_parser.h +0 -688
- data/ext/iodine/fio_siphash.c +0 -157
- data/ext/iodine/fio_siphash.h +0 -37
- data/ext/iodine/fio_tls.h +0 -129
- data/ext/iodine/fio_tls_missing.c +0 -649
- data/ext/iodine/fio_tls_openssl.c +0 -1106
- data/ext/iodine/fio_tmpfile.h +0 -50
- data/ext/iodine/fiobj.h +0 -44
- data/ext/iodine/fiobj4fio.h +0 -21
- data/ext/iodine/fiobj_ary.c +0 -333
- data/ext/iodine/fiobj_ary.h +0 -139
- data/ext/iodine/fiobj_data.c +0 -1187
- data/ext/iodine/fiobj_data.h +0 -167
- data/ext/iodine/fiobj_hash.c +0 -409
- data/ext/iodine/fiobj_hash.h +0 -176
- data/ext/iodine/fiobj_json.c +0 -622
- data/ext/iodine/fiobj_json.h +0 -68
- data/ext/iodine/fiobj_mem.h +0 -71
- data/ext/iodine/fiobj_mustache.c +0 -317
- data/ext/iodine/fiobj_mustache.h +0 -62
- data/ext/iodine/fiobj_numbers.c +0 -344
- data/ext/iodine/fiobj_numbers.h +0 -127
- data/ext/iodine/fiobj_str.c +0 -433
- data/ext/iodine/fiobj_str.h +0 -172
- data/ext/iodine/fiobject.c +0 -620
- data/ext/iodine/fiobject.h +0 -655
- data/ext/iodine/hpack.h +0 -1923
- data/ext/iodine/http.c +0 -2743
- data/ext/iodine/http.h +0 -1002
- data/ext/iodine/http1.c +0 -910
- data/ext/iodine/http1.h +0 -29
- data/ext/iodine/http1_parser.h +0 -878
- data/ext/iodine/http_internal.c +0 -1279
- data/ext/iodine/http_internal.h +0 -237
- data/ext/iodine/http_mime_parser.h +0 -350
- data/ext/iodine/iodine_caller.c +0 -230
- data/ext/iodine/iodine_connection.c +0 -941
- data/ext/iodine/iodine_defer.c +0 -420
- data/ext/iodine/iodine_fiobj2rb.h +0 -120
- data/ext/iodine/iodine_helpers.c +0 -282
- data/ext/iodine/iodine_helpers.h +0 -12
- data/ext/iodine/iodine_http.c +0 -1181
- data/ext/iodine/iodine_http.h +0 -23
- data/ext/iodine/iodine_json.c +0 -302
- data/ext/iodine/iodine_mustache.c +0 -567
- data/ext/iodine/iodine_pubsub.c +0 -580
- data/ext/iodine/iodine_pubsub.h +0 -26
- data/ext/iodine/iodine_rack_io.c +0 -273
- data/ext/iodine/iodine_rack_io.h +0 -20
- data/ext/iodine/iodine_store.c +0 -148
- data/ext/iodine/iodine_tcp.c +0 -346
- data/ext/iodine/iodine_tcp.h +0 -13
- data/ext/iodine/iodine_tls.c +0 -261
- data/ext/iodine/mustache_parser.h +0 -1546
- data/ext/iodine/redis_engine.c +0 -957
- data/ext/iodine/redis_engine.h +0 -79
- data/ext/iodine/resp_parser.h +0 -317
- data/ext/iodine/websocket_parser.h +0 -506
- data/ext/iodine/websockets.c +0 -743
- data/ext/iodine/websockets.h +0 -185
- data/lib/iodine/connection.rb +0 -61
- data/lib/iodine/json.rb +0 -42
- data/lib/iodine/mustache.rb +0 -113
- data/lib/iodine/pubsub.rb +0 -55
- data/lib/iodine/rack_utils.rb +0 -43
- data/lib/iodine/tls.rb +0 -16
- data/lib/rack/handler/iodine.rb +0 -33
- data/logo.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 781c1c2b2b5a70993cb6e87071d66afb80e7e1d5d2750fefc260a1f3350ff34f
|
|
4
|
+
data.tar.gz: '07845be2ed2fdeb9857e236738813c1b3555c79d17c84c08ec7502205ddaf0ef'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c06c8b755ffa946ecb71c46eede942cf859ea361e2526459875c2a369c820ca2c52f2a43bc5a45bee1bf00618581d32b3162d49d081d2c87acfd5fb78e198ff1
|
|
7
|
+
data.tar.gz: c2f45fffdd0728472b07eeb0e1a7cfeb7a5b70cddea589d6572c6da53d578018b5b34bf2e8c046e1a20a5a27c7f5960720886fd5e9d70a262ea5b4bcb011ddce
|
data/.clang-format
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
Language: Cpp
|
|
3
|
+
BasedOnStyle: LLVM
|
|
4
|
+
AllowAllParametersOfDeclarationOnNextLine: false
|
|
5
|
+
AllowAllArgumentsOnNextLine: false
|
|
6
|
+
PenaltyReturnTypeOnItsOwnLine: 1000
|
|
7
|
+
BinPackArguments: false
|
|
8
|
+
BinPackParameters: false
|
|
9
|
+
AlignConsecutiveMacros: true
|
|
10
|
+
AllowShortCaseLabelsOnASingleLine: true
|
|
11
|
+
---
|
|
12
|
+
Language: JavaScript
|
|
13
|
+
BasedOnStyle: Google
|
|
14
|
+
...
|
|
15
|
+
|
data/.rspec
CHANGED
data/.yardopts
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,134 @@
|
|
|
1
1
|
# Iodine
|
|
2
|
+
|
|
2
3
|
[](https://badge.fury.io/rb/iodine)
|
|
3
|
-
|
|
4
|
+
Please notice that this change log contains updates for upcoming releases as well as previous releases.
|
|
5
|
+
|
|
6
|
+
Please refer to the current gem version to review the relevant changes for your release.
|
|
7
|
+
|
|
8
|
+
## Changes
|
|
9
|
+
|
|
10
|
+
#### 0.8.0 - 2026-10-14
|
|
11
|
+
|
|
12
|
+
**Update**: updated to facil.io 0.8.0, using the latest version of the [facil.io C STL](https://github.com/facil-io/cstl).
|
|
13
|
+
|
|
14
|
+
**Update**: totally re-written both the C extension and the Ruby code. All API should be considered broken / changed.
|
|
15
|
+
|
|
16
|
+
**Update**: supports the [NeoRack specification](https://github.com/boazsegev/neorack/blob/master/SPEC.md) and its existing [extentions](https://github.com/boazsegev/neorack/blob/master/extensions), including [Rack backwards compatibility](https://github.com/boazsegev/neorack/blob/master/extensions/rack.md) with support for the previous `rack.upgrade?` WebSocket & SSE approach.
|
|
17
|
+
|
|
18
|
+
**Feature**: RESP3 Pub/Sub support is implemented via `Iodine::PubSub::Engine::RESP3`. Use `-r redis://host:port` from CLI or create it programmatically with `Iodine::PubSub::Engine::RESP3.new(url, ping: 30)`. The RESP3 engine also supports arbitrary Valkey/Redis commands via `resp3.cmd("GET", "key") { |result| ... }`.
|
|
19
|
+
|
|
20
|
+
**Breaking Change**: `Iodine::PubSub::Engine::Redis` was renamed to `Iodine::PubSub::Engine::RESP3` to reflect support for RESP3-compatible databases such as Valkey and Redis.
|
|
21
|
+
|
|
22
|
+
**Feature**: `Iodine::PubSub::Engine::RESP3#connection_state` reports `:connecting`, `:connected`, or `:error` for the engine's constructor-initiated RESP3 handshake.
|
|
23
|
+
|
|
24
|
+
**Feature**: New `Iodine::Logger` module routes Ruby logging through the facil.io C STL logging system (`FIO_LOG_*`), sharing the C core's stderr sink and global log level. Offers `fatal`, `error`, `warn`, `info` and `debug` (variadic - each argument is logged separately; callable arguments are invoked; a block's return value is logged, Rack SPEC compatible; nothing is evaluated while the level is silenced), `<<` as an `info` alias, and `level` / `level=` (Integer 0-5 or Symbol) with `NONE`/`FATAL`/`ERROR`/`WARN`/`INFO`/`DEBUG` constants.
|
|
25
|
+
|
|
26
|
+
**Deprecation**: `Iodine.verbosity` and `Iodine.verbosity=` are deprecated in favor of `Iodine::Logger.level` and `Iodine::Logger.level=`.
|
|
27
|
+
|
|
28
|
+
**Feature**: Embedded TLS 1.3 is now always available as a fallback TLS backend. Enable it via:
|
|
29
|
+
- Runtime: `Iodine::TLS.default = :iodine`
|
|
30
|
+
- Environment: `IODINE_MTLS=1`
|
|
31
|
+
- CLI: `iodine -mtls`
|
|
32
|
+
- Compile-time default: `IODINE_USE_EMBEDDED_TLS=1 gem install iodine`
|
|
33
|
+
|
|
34
|
+
**Feature**: New `Iodine::TLS.default` and `Iodine::TLS.default=` methods allow runtime switching between TLS backends (`:openssl` or `:iodine`).
|
|
35
|
+
|
|
36
|
+
**Feature**: New `Iodine.secret` and `Iodine.secret=` methods for server-wide secret management. The secret is used for cryptographic operations (session signing, CSRF tokens, etc.) and can be seeded from the `SECRET` environment variable or set explicitly before starting the server.
|
|
37
|
+
|
|
38
|
+
**Feature**: `Iodine::Listener` (returned by `Iodine.listen`) now supports URL-based routing via `Iodine::Listener#map(url, handler)`. Partial path matches are supported (e.g., mapping `"/api"` routes all `"/api/*"` requests to the given handler, with the matched prefix stripped from `connection.path`).
|
|
39
|
+
|
|
40
|
+
**Feature**: New `Iodine.make_resource(handler)` method and `Iodine::Connection::ResourceHandler` interface for automatic REST/CRUD routing. Adds an `on_http` implementation that dispatches `GET /`, `GET /:id`, `GET /new`, `GET /:id/edit`, `POST /`, `PATCH /:id`, `PUT /:id`, and `DELETE /:id` to the corresponding `index`, `show`, `new`, `edit`, `create`, `update`, and `delete` callbacks.
|
|
41
|
+
|
|
42
|
+
**Feature**: New `Iodine::PubSub::History` module for in-process message history and replay. Call `Iodine::PubSub::History.cache` to enable the built-in memory cache (default 256 MB limit), then subscribe with a `since:` timestamp to replay missed messages. Custom history backends can be implemented by subclassing `Iodine::PubSub::History::Manager`.
|
|
43
|
+
|
|
44
|
+
**Feature**: Extended `Iodine::Utils` with cryptographic hashing functions: `sha256`, `sha512`, `sha3_256`, `sha3_512`, `blake2b`, `blake2s`, `hmac256`.
|
|
45
|
+
|
|
46
|
+
**Feature**: Extended `Iodine::Utils` with additional hashing and MAC functions: `sha3_224`, `sha3_384`, `shake128` (XOF, variable-length), `shake256` (XOF, variable-length), `sha1` (legacy/protocol compatibility), `hmac512`, `hmac160`, `hmac128` (Poly1305-MAC).
|
|
47
|
+
|
|
48
|
+
**Feature**: Extended `Iodine::Utils` with non-cryptographic hash functions: `risky_hash` (64-bit, seeded), `risky256` (256-bit), `risky512` (512-bit), `risky256_hmac`, `risky512_hmac`. Suitable for hash tables, checksums, and data partitioning; not for security use.
|
|
49
|
+
|
|
50
|
+
**Feature**: Extended `Iodine::Utils` with `crc32(data, initial_crc: 0)` — CRC32 checksum (ITU-T V.42 / gzip polynomial) with support for incremental computation across multiple buffers.
|
|
51
|
+
|
|
52
|
+
**Feature**: Extended `Iodine::Utils` with `secure_random(bytes: 32)` — cryptographically secure random bytes from the system CSPRNG (`arc4random_buf` on BSD/macOS, `BCryptGenRandom` on Windows, `getrandom` or `/dev/urandom` on Linux). If the system CSPRNG fails, it falls back to the facil.io PRNG instead of raising.
|
|
53
|
+
|
|
54
|
+
**Feature**: Extended `Iodine::Utils` with TOTP utilities: `totp_secret` (generate Base32 secrets) and `totp_verify` (verify codes with time window).
|
|
55
|
+
|
|
56
|
+
**Feature**: New `Iodine::Base::Crypto` module with modern cryptographic primitives:
|
|
57
|
+
- `ChaCha20Poly1305` - AEAD encryption/decryption (12-byte nonce)
|
|
58
|
+
- `XChaCha20Poly1305` - AEAD encryption/decryption (24-byte nonce, safe for random nonces)
|
|
59
|
+
- `AES128GCM` - AEAD encryption/decryption with AES-128 (12-byte nonce)
|
|
60
|
+
- `AES256GCM` - AEAD encryption/decryption with AES-256 (12-byte nonce)
|
|
61
|
+
- `Ed25519` - Digital signatures (keypair, sign, verify, key conversion to X25519)
|
|
62
|
+
- `X25519` - Key exchange (ECDH) and public-key encryption (ECIES with ChaCha20, AES-128-GCM, or AES-256-GCM via `encrypt`, `encrypt_aes128`, `encrypt_aes256`)
|
|
63
|
+
- `HKDF` - Key derivation (RFC 5869, SHA-256 or SHA-384)
|
|
64
|
+
- `X25519MLKEM768` - Post-quantum hybrid KEM (X25519 + ML-KEM-768 / Kyber)
|
|
65
|
+
|
|
66
|
+
**Feature**: New `Iodine::Base::Compression` module with `Deflate`, `Gzip`, and `Brotli` submodules, each providing `compress` and `decompress` class methods. Supports configurable compression levels.
|
|
67
|
+
|
|
68
|
+
**Feature**: New `Iodine::Base::Crypto::Argon2` and `Iodine::Base::Crypto::Lyra2` memory-hard password hashing bindings. `Argon2.hash(password, salt:, ...)` supports the `:d`, `:i`, and `:id` variants (RFC 9106, Argon2id by default) with configurable time/memory/parallelism costs, optional secret and associated data. `Lyra2.hash(password, salt:, ...)` offers configurable cost parameters as well.
|
|
69
|
+
|
|
70
|
+
**Feature**: mTLS (mutual TLS) client certificate authentication:
|
|
71
|
+
- `Iodine::TLS#trust(path = nil)` loads a CA certificate file (or the system trust store when `nil` / `"system"`) and enables peer (client) certificate verification.
|
|
72
|
+
- `Iodine::Connection#certificate` returns the peer's leaf certificate and `Iodine::Connection#each_certificate` enumerates the peer's whole chain, using the new immutable `Iodine::TLS::Certificate` snapshot class (`cn`, `subject`, `issuer`, `serial`, `san_dns`, `san_ip`, `not_before`, `not_after`, `fingerprint`, `key_algo`, `signature_algo`, `key_usage`, `version`, `chain_index`, `verified?`, `ca?`).
|
|
73
|
+
- CLI / bind-URL support: `iodine -b https://0.0.0.0/?trust=ca.pem` or `?trust=system`.
|
|
74
|
+
|
|
75
|
+
**Feature**: `QUERY` HTTP method support. `Iodine.make_resource` routes `QUERY` requests to a `query` callback (falls back to `index` when undefined), and HTTP requests carry a unique request id.
|
|
76
|
+
|
|
77
|
+
**Feature**: New `Iodine::PubSub::Subscription` class for independent, non-IO-bound subscriptions (`Iodine::PubSub::Subscription.new(channel) { |msg| ... }`). Supports `handler`, `handler=`, `active?` and `cancel`.
|
|
4
78
|
|
|
5
|
-
|
|
79
|
+
**Feature**: New `Iodine.async(&block)` method schedules a block to run on the worker thread pool (in parallel, outside the IO thread), complementing `Iodine.run` (which runs on the IO thread's event queue).
|
|
6
80
|
|
|
7
|
-
|
|
81
|
+
**Feature**: New `Iodine.shutdown_timeout` and `Iodine.shutdown_timeout=` (milliseconds) control the graceful shutdown timeout for worker processes.
|
|
82
|
+
|
|
83
|
+
**Feature**: New `Iodine::Utils.totp(secret:, offset: 0, interval: 30)` generates the current TOTP code (complementing `totp_secret` / `totp_verify`).
|
|
84
|
+
|
|
85
|
+
**Feature**: Hot code swapping / hot restarts. In cluster mode the application code is (re)loaded only by worker processes, allowing `SIGUSR1` (or the new CLI option `-hr <seconds>`) to hot-restart the app with zero-downtime worker rotation. `--preload` disables code swapping (copy-on-write memory optimization).
|
|
86
|
+
|
|
87
|
+
**Feature**: Windows support (single-process mode). Iodine now compiles and runs on Windows (MSYS2/MinGW and MSVC). Note that cluster mode is unavailable on Windows — setting `Iodine.workers` to a positive value raises `NotImplementedError`.
|
|
88
|
+
|
|
89
|
+
**Security**: HTTP/1.1 parser hardening — strict header validation and rejection of ambiguous requests (disconnection is preferred over the risk of request smuggling).
|
|
90
|
+
|
|
91
|
+
**Security**: Response headers are validated before they are sent. Header names with forbidden characters (whitespace, `:`, CR, LF, NUL) and values with CR, LF or NUL are dropped, which blocks response splitting.
|
|
92
|
+
|
|
93
|
+
**Fix**: Header values that contain newlines are sent as separate header lines (e.g., Rack 2 style `Set-Cookie` values joined with `"\n"`). Before this fix, such values crashed the server.
|
|
94
|
+
|
|
95
|
+
**Fix**: The server now closes the connection after the response when a request sends `Connection: close`, or uses HTTP/1.0 without `Connection: keep-alive`. Streamed responses to HTTP/1.0 clients are no longer chunk-encoded; closing the connection marks the end of the body.
|
|
96
|
+
|
|
97
|
+
**Security**: Requests whose `Transfer-Encoding` does not end with `chunked` (e.g., `gzip` or `chunked, gzip`) are rejected with `400 Bad Request` and the connection is closed. Before this fix, the body of such a request could be read as a second, hidden request (request smuggling). HTTP/1.1 requests without a `Host` header are rejected too.
|
|
98
|
+
|
|
99
|
+
**Fix**: The HTTP client now skips interim `1xx` responses (e.g., `100 Continue`) and never waits for a body after `HEAD`, `204` or `304` responses.
|
|
100
|
+
|
|
101
|
+
**Fix**: `rack.url_scheme` now reports each connection's own transport. Before this fix, one HTTPS listener made every request report `https`, including requests to plain HTTP listeners.
|
|
102
|
+
|
|
103
|
+
**Feature**: `Iodine::Connection#tls?` returns `true` when the connection uses TLS.
|
|
104
|
+
|
|
105
|
+
**Update**: `env['rack.logger']` is now `Iodine::Logger`. Rack log messages share iodine's log output and level (`Iodine::Logger.level`, default `INFO`, so `debug` messages are hidden by default). Iodine no longer loads the `logger` gem, which is not a default gem since Ruby 4.0.
|
|
106
|
+
|
|
107
|
+
**Fix**: Worker processes no longer report false `leaks detected` errors when they exit. Workers now run Ruby's garbage collector after all connections close, so objects that are no longer in use are freed before the leak check.
|
|
108
|
+
|
|
109
|
+
**Feature**: `Iodine::JSON.beautify(ruby_object)` — pretty-prints a Ruby object as a formatted JSON string.
|
|
110
|
+
|
|
111
|
+
**Feature**: `Iodine::Connection#publish` instance method added alongside the existing `Iodine::Connection.publish` class method. The instance method publishes to everyone *except* the calling connection (per the NeoRack pub/sub extension).
|
|
112
|
+
|
|
113
|
+
**Fix**: WebSocket `write` now correctly sends text frames for UTF-8 encoded strings and binary frames for non-UTF-8 strings, matching the WebSocket specification.
|
|
114
|
+
|
|
115
|
+
**Fix**: Fixed a type mismatch that caused incorrect behavior in certain connection scenarios. Credit to @michal-kazmierczak (Michał Kaźmierczak) for reporting issue #156.
|
|
116
|
+
|
|
117
|
+
**Fix**: Fixed a segfault that could occur when passing a `Proc` as the handler to `Iodine.listen`.
|
|
118
|
+
|
|
119
|
+
**Breaking Change**: Removed deprecated `Iodine::PubSub::Engine::ROOT`, `Iodine::PubSub::Engine::PROCESS`, and `Iodine::PubSub::Engine::SIBLINGS` constants. Use `Iodine::PubSub::Engine::LOCAL` (local machine, all processes) or `Iodine::PubSub::Engine::CLUSTER` (entire cluster, default) instead.
|
|
120
|
+
|
|
121
|
+
**Breaking Change**: Removed `Iodine.defer` (use `Iodine.run` or `Iodine.async`), `Iodine.run_every` (use `Iodine.run_after(ms, 0)`), `Iodine.on_idle` (use `Iodine.on_state(:idle)`), `Iodine.connect` and `Iodine.attach_fd` (use `Iodine::Connection.new`).
|
|
122
|
+
|
|
123
|
+
------------------------
|
|
124
|
+
|
|
125
|
+
## Total Rewrite
|
|
126
|
+
|
|
127
|
+
The new version is a complete rewrite, with a new architecture and a new API. Backwards compatibility was kept where possible.
|
|
128
|
+
|
|
129
|
+
All previous changes influenced the architecture of the new version.
|
|
130
|
+
|
|
131
|
+
------------------------
|
|
8
132
|
|
|
9
133
|
#### Change log v.0.7.58 (2024-04-28)
|
|
10
134
|
|
|
@@ -148,7 +272,7 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
|
148
272
|
|
|
149
273
|
#### Change log v.0.7.31
|
|
150
274
|
|
|
151
|
-
**Security**: a heap-overflow vulnerability was fixed in the WebSocket parser. This attack could have been triggered remotely by a maliciously crafted message-header. Credit to Dane (4cad@silvertoque) for exposing this issue and providing a Python script demonstrating the attack.
|
|
275
|
+
**Security**: a heap-overflow vulnerability was fixed in the WebSocket parser. This attack could have been triggered remotely by a maliciously crafted message-header. Credit to Dane (4cad@silvertoque) for exposing this issue and providing a Python script demonstrating the attack.
|
|
152
276
|
|
|
153
277
|
It's recommended that all iodine users update to the latest version.
|
|
154
278
|
|
|
@@ -214,7 +338,7 @@ It's recommended that all iodine users update to the latest version.
|
|
|
214
338
|
|
|
215
339
|
#### Change log v.0.7.20
|
|
216
340
|
|
|
217
|
-
**Security**: (`fio`) lower and smarter Slowloris detection limits (backlog limit is now 1,024 responses / messages per client).
|
|
341
|
+
**Security**: (`fio`) lower and smarter Slowloris detection limits (backlog limit is now 1,024 responses / messages per client).
|
|
218
342
|
|
|
219
343
|
**Security**: (`http`) HTTP/1.1 slow client throttling - new requests will not be consumed until pending responses were sent. Since HTTP/1.1 is a response-request protocol, this protocol specific approach should protect the HTTP application against slow clients.
|
|
220
344
|
|
|
@@ -398,7 +522,7 @@ It's recommended that all iodine users update to the latest version.
|
|
|
398
522
|
|
|
399
523
|
#### Change log v.0.7.0
|
|
400
524
|
|
|
401
|
-
This version bump is performed because the internal engine changed significantly and might be considered less mature. The public API remains unbroken.
|
|
525
|
+
This version bump is performed because the internal engine changed significantly and might be considered less mature. The public API remains unbroken.
|
|
402
526
|
|
|
403
527
|
**Fix**: Fixed a documentation error. Credit to @Fonsan (Erik Fonselius) for PR #41.
|
|
404
528
|
|
|
@@ -406,7 +530,6 @@ This version bump is performed because the internal engine changed significantly
|
|
|
406
530
|
|
|
407
531
|
**Update**: (facil.io) Updated to facil.io version 0.7.0 (edge). This could effect memory consumption behavior but otherwise shouldn't effect iodine all that much.
|
|
408
532
|
|
|
409
|
-
|
|
410
533
|
#### Change log v.0.6.5
|
|
411
534
|
|
|
412
535
|
**Fix**: (facil.io - logging) Fix typo in log output. Credit to @bjeanes (Bo Jeanes) for PR #39.
|
|
@@ -691,7 +814,7 @@ Iodine.start
|
|
|
691
814
|
|
|
692
815
|
**Compatibility**: (from `facil.io`) Now checks for HTTP/1.0 clients to determine connection persistence.
|
|
693
816
|
|
|
694
|
-
**Compatibility**: (from `facil.io`) Added spaces after header names (`:` =>
|
|
817
|
+
**Compatibility**: (from `facil.io`) Added spaces after header names (`:` => `:`), since some parsers don't seem to read the RFC.
|
|
695
818
|
|
|
696
819
|
---
|
|
697
820
|
|
|
@@ -705,7 +828,7 @@ Iodine.start
|
|
|
705
828
|
|
|
706
829
|
#### Change log v.0.3.1
|
|
707
830
|
|
|
708
|
-
**Update**: Follow `facil.io`'s update for healthier thread throttling and energy consumption
|
|
831
|
+
**Update**: Follow `facil.io`'s update for healthier thread throttling and energy consumption
|
|
709
832
|
---
|
|
710
833
|
|
|
711
834
|
#### Change log v.0.3.1
|
|
@@ -798,7 +921,6 @@ Iodine.start
|
|
|
798
921
|
|
|
799
922
|
* `bscrypt` random generator (where `dev/random` is unavailable) should now provide more entropy.
|
|
800
923
|
|
|
801
|
-
|
|
802
924
|
---
|
|
803
925
|
|
|
804
926
|
#### Change log v.0.2.9
|
|
@@ -1097,8 +1219,6 @@ Another example is that real-life deployment preferences were favored over adjus
|
|
|
1097
1219
|
|
|
1098
1220
|
I tested this new gem during the 0.0.x version releases, and I feel that version 0.1.0 is stable enough to work with. For instance, I left the Iodine server running all night under stress (repeatedly benchmarking it)... millions of requests later, under heavy load, a restart wasn't required and memory consumption didn't show any increase after the warmup period.
|
|
1099
1221
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
1222
|
## License
|
|
1103
1223
|
|
|
1104
1224
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Gemfile
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
gem 'pry'
|
|
5
|
-
gem 'rspec'
|
|
6
|
-
gem 'rack'
|
|
7
|
-
gem 'http'
|
|
8
|
-
end
|
|
3
|
+
source "https://rubygems.org"
|
|
9
4
|
|
|
10
5
|
# Specify your gem's dependencies in iodine.gemspec
|
|
11
6
|
gemspec
|
|
7
|
+
|
|
8
|
+
gem "rake", "~> 13.0"
|
|
9
|
+
gem "rspec", "~> 3.0"
|
data/LICENSE.txt
CHANGED