Add a TouchSocket entry (disabled pending a close-path fix) - #1453
Open
MDA2AV wants to merge 1 commit into
Open
Conversation
TouchSocket.Http is the HTTP/1.1 server component of the TouchSocket networking
framework. Requests are answered from an IHttpPlugin, which is how the library
exposes its HTTP pipeline: the plugin sees each request, answers the ones it
recognises and passes the rest along. h1 cleartext on :8080, plus the async
delay.
It is committed with enabled: false, because it does not pass validation and the
reason is in the library rather than in the entry.
A request that arrives split across TCP segments AND asks for Connection: close
is answered with nothing - the socket is closed instead of the response being
flushed. Sweeping every split offset of one request:
Connection: keep-alive 54/54 offsets answered correctly
Connection: close 20/73 offsets answered with nothing
So request reassembly is fine; it is the close path. Ordinary curl traffic never
shows it, which is why the entry looks healthy by hand and fails the harness -
the fragmentation checks send exactly that shape.
The handler does no parsing of its own, so nothing between the socket and the
plugin is this entry's code. Repro and measurements are in the README.
/json is serialized from the parsed model on every request and compressed only
when the client asked for it, so nothing is answered from a precomputed body.
The project is named touchsocketarena rather than touchsocket: a project named
for the package it depends on makes NuGet resolve a dependency cycle on itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TouchSocket —
TouchSocket.Http, the HTTP/1.1 server component of the framework, added as an engine.Requests are answered from an
IHttpPlugin, which is how the library exposes its HTTP pipeline: the plugin sees each request, answers the ones it recognises and passes the rest along. h1 cleartext on:8080, plus the async delay.Why it is committed disabled
It does not pass validation, and the cause is in the library rather than in the entry, so I would rather land it visibly with a reproduction than quietly drop it.
A request that arrives split across TCP segments and asks for
Connection: closeis answered with nothing — the socket is closed instead of the response being flushed.Sweeping every split offset of a single request against
TouchSocket.Http4.3.6 on .NET 10:Connection: keep-aliveConnection: closeSo request reassembly is fine — it is the close path specifically. Ordinary
curltraffic never shows it, which is why the entry looks healthy by hand and fails the harness: the fragmentation checks send exactly that shape.Reproduction
The handler does no parsing of its own, so nothing between the socket and the plugin is this entry's code:
Flip
enabledtotrueinmeta.jsononce this is fixed and the entry should pass as it stands.Notes
/jsonis serialized from the parsed model on every request and compressed only when the client asked for it, at brotli quality 1 — nothing answered from a precomputed body.touchsocketarenarather thantouchsocket: a project named for the package it depends on makes NuGet resolve a dependency cycle on itself (NU1108).@RRQM — flagging you as TouchSocket's maintainer, both so you can see how the library is being represented here and because of the
Connection: closebehaviour above. Happy to move that to an issue onRRQM/TouchSocketif you would rather track it there, and to re-run the full suite against any fix.