You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following sites remain on tokenless overloads and warrant a batched follow-up rather than atomic in-scope work, either because they carry different lifetime semantics from the simple sibling pattern or because they are vendored code that is not exercised by MTConnect production paths.
Streaming endpoints — MTConnectHttpResponseHandler.WriteToResponseStream (libraries/MTConnect.NET-HTTP/Servers/MTConnectHttpResponseHandler.cs:214) via args.Message.CopyToAsync(responseStream) (tokenless). Reached from MTConnectCurrentResponseHandler + MTConnectSampleResponseHandler via event-delegate closures over HeartbeatReceived / DocumentReceived. The correct fix pattern here is not a simple 3-arg overload — the stream's lifetime is event-driven and the CT needs to compose with MTConnectHttpServerStream.Stop(). Bounded by socket-level failure surfacing through the delegate exception path, so behaviour is not immediately buggy — but a proper fix threads the outer cancellationToken from OnRequestReceived into the event-delegate closures.
File-serving handlers — FileHandler.cs:388, 665 and FileMirrorHandler.cs:263, 278, 510, 513 — all ReadAsync / WriteAsync sites on file-mirror or file-serve read loops. Vendored dead code (not exercised by MTConnect production paths); low priority; batch under this issue when convenient.
Low-level chunked-encoding helpers — HttpResponse.cs:368, 373, 403, 410, 488 — internal WriteAsync sites in the private chunk-header writes. Below the public API abstraction; a fix requires threading CT through the internal Send / FlushChunkAsync helpers, which is a wider refactor than the CA2022 warnings-cleanup scope.
Dime cycles 4-7 on PR #219, 2026-08-21. Filed per CONVENTIONS §1.0d-trigies-septies (MEDIUM+ findings must be CLOSED, SKIP-rationale, or TRACKED before Ready flip) as the aggregate TRACK for residual vendored-Ceen CT-threading work.
Context
Consolidation issue surfaced by the dime cycle 4-7 review sequence on PR #219.
Cycles 4-7 fixed the following CancellationToken-threading gaps in the vendored Ceen HTTP tree:
MTConnectPostResponseHandler.ReadRequestBytes(F-IMP-001, cycle 4)SimpleProxyHandler.HandleAsyncrequest-body drain (F-IMP-005, cycle 5)RestApiHelper.Post/PutDetailbody reads (F-IMP-005, cycle 5)SimpleProxyHandler.HandleAsyncresponse copy (F-IMP-C6-001, cycle 6)WriteAllAsync(Stream)+WriteResponse+WriteToStreamchain (F-IMP-C7-001, cycle 7)HttpRequest.csmultipart form parser — tracked at follow-up: multipart form parser leaks read task on cancellation (Ceen HttpRequest) #257Residual gaps
The following sites remain on tokenless overloads and warrant a batched follow-up rather than atomic in-scope work, either because they carry different lifetime semantics from the simple sibling pattern or because they are vendored code that is not exercised by MTConnect production paths.
Streaming endpoints —
MTConnectHttpResponseHandler.WriteToResponseStream(libraries/MTConnect.NET-HTTP/Servers/MTConnectHttpResponseHandler.cs:214) viaargs.Message.CopyToAsync(responseStream)(tokenless). Reached fromMTConnectCurrentResponseHandler+MTConnectSampleResponseHandlervia event-delegate closures overHeartbeatReceived/DocumentReceived. The correct fix pattern here is not a simple 3-arg overload — the stream's lifetime is event-driven and the CT needs to compose withMTConnectHttpServerStream.Stop(). Bounded by socket-level failure surfacing through the delegate exception path, so behaviour is not immediately buggy — but a proper fix threads the outercancellationTokenfromOnRequestReceivedinto the event-delegate closures.File-serving handlers —
FileHandler.cs:388, 665andFileMirrorHandler.cs:263, 278, 510, 513— allReadAsync/WriteAsyncsites on file-mirror or file-serve read loops. Vendored dead code (not exercised by MTConnect production paths); low priority; batch under this issue when convenient.Low-level chunked-encoding helpers —
HttpResponse.cs:368, 373, 403, 410, 488— internalWriteAsyncsites in the private chunk-header writes. Below the public API abstraction; a fix requires threading CT through the internal Send / FlushChunkAsync helpers, which is a wider refactor than the CA2022 warnings-cleanup scope.Composes with
Provenance
Dime cycles 4-7 on PR #219, 2026-08-21. Filed per CONVENTIONS §1.0d-trigies-septies (MEDIUM+ findings must be CLOSED, SKIP-rationale, or TRACKED before Ready flip) as the aggregate TRACK for residual vendored-Ceen CT-threading work.