05f6147433
Queued cleanup, run only AFTER the roster gate closed in both directions,
so the live A/B changed exactly one thing.
The two `drain_body` implementations were character-for-character
identical, so the extraction is a move. What it guards is not cosmetic:
answering while the client is still sending leaves unread data in the
receive queue and Linux turns the close into an RST rather than a FIN --
invisible in any comparison of the response, and worth two live gate
attempts to find. Behaviour that must be identical across hosts gets one
implementation, the same reasoning that produced openfut-tls.
SCOPE IS DELIBERATELY NARROW. Only the byte-identical part moved. The two
head-reading loops are NOT identical and stay where they are:
redirector roster
head cap 65536 16384
read chunk 4096 1024
on error abort proceed if any bytes arrived
Those differences are probably accidental, but each host is gate-proven
with the values it has. Unifying them would be a behaviour change wearing
a refactor's clothes -- exactly the mistake this project has already paid
for. They converge later as their own change with their own gate, or not
at all.
Purity shown, not asserted: every existing test in both hosts still
passes (426 workspace tests), and 7/7 mutations are killed, including
three in the SHARED crate that must break both hosts at once and one per
host that skips the drain call.
Three test cases neither host had now exist, because the extracted code
finally had somewhere to be tested directly: a malformed Content-Length,
an unterminated head, and a lookalike header. That last one matters --
`X-Original-Content-Length: 99` would drain 99 bytes that were never sent
if the match were `contains` rather than `starts_with`, and a mutation
confirms the test catches it.
Also fixes a race this run exposed in openfut-tls's own tests: keypair()
returned early if the certificate file existed, but wrote the certificate
BEFORE the key, so a parallel test could observe a cert whose key had not
landed. It failed one run and passed the next -- the kind of flake that
gets rerun instead of fixed. Now generated once per process via OnceLock,
key written first, and the suite was repeated five times to confirm.
Nothing deployed and nothing restarted: the running redirector and roster
are still the gate-proven binaries.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 lines
1.3 KiB
TOML
32 lines
1.3 KiB
TOML
[package]
|
|
name = "openfut-redirector-host"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
description = "FIFA 17 Blaze redirector transport host (legacy TLS compatibility island)"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
openfut-adapter-fifa17 = { path = "../openfut-adapter-fifa17" }
|
|
openfut-host-config = { path = "../openfut-host-config" }
|
|
openfut-http = { path = "../openfut-http" }
|
|
# Shared legacy-TLS listener. See its manifest for why openssl and not rustls.
|
|
openfut-tls = { path = "../openfut-tls" }
|
|
|
|
# Direct openssl, NOT native-tls.
|
|
#
|
|
# This is deliberately the opposite of what native-tls is for. native-tls
|
|
# abstracts over whatever the platform provides; here the requirement is
|
|
# precise, evidenced behaviour for one legacy client that offers exactly eight
|
|
# static-RSA suites. That needs explicit control of the cipher list, protocol
|
|
# floor and ceiling, and security level — knobs the openssl crate exposes and
|
|
# native-tls deliberately hides.
|
|
#
|
|
# VENDORED, because this project's reproducibility work would be undone by a
|
|
# distro libssl update silently changing whether FIFA 17 can connect. The exact
|
|
# linked version is printed at startup and recorded in gate evidence.
|
|
#
|
|
# Scoped to THIS crate only: neither OpenFUT Core nor the generic protocol
|
|
# crates gain an OpenSSL dependency.
|
|
openssl = { version = "0.10", features = ["vendored"] }
|