Skip to content

Commit 812fe3e

Browse files
committed
Enable Content-Length header in stdio reader
This change turns on the "Content-Length" header expectation for the MessageReader that is used in the language service host. The VS Code plugin now writes out this header for all of its requests.
1 parent 26077c0 commit 812fe3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PowerShellEditorServices.Transport.Stdio/StdioHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async Task ListenForMessages()
142142
MessageReader messageReader =
143143
new MessageReader(
144144
System.Console.In,
145-
MessageFormat.WithoutContentLength,
145+
MessageFormat.WithContentLength,
146146
messageTypeResolver);
147147

148148
MessageWriter messageWriter =

test/PowerShellEditorServices.Test.Host/LanguageServiceManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void Start()
7373
this.MessageWriter =
7474
new MessageWriter(
7575
this.languageServiceProcess.StandardInput,
76-
MessageFormat.WithoutContentLength,
76+
MessageFormat.WithContentLength,
7777
messageTypeResolver);
7878

7979
// Wait for the 'started' event

0 commit comments

Comments
 (0)