fix(lsp): correct Content-Length in BDD scenario from 46 to 43 bytes

Body is exactly 43 bytes long. CL=46 caused _read_one_message to timeout
waiting for 3 extra bytes, returning None instead of valid JSON.
This commit is contained in:
2026-05-15 06:22:45 +00:00
committed by drew
parent 1a6f10d5fb
commit b5b4e740c2
@@ -26,7 +26,7 @@ Feature: LSP transport header injection vulnerability (issue #7112)
And the error message must contain "non-ASCII"
@tdd_issue_7112 Scenario: Valid ASCII headers are processed correctly
Given a Transport mock with BytesIO stream containing b"Content-Length: 46\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"success\"}"
Given a Transport mock with BytesIO stream containing b"Content-Length: 43\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"success\"}"
When _read_one_message() is invoked
Then it should return a parsed JSON dict
And the result must contain "jsonrpc" == "2.0"