opengoal-vscode/patches/vscode-jsonrpc+8.1.0.patch

15 lines
872 B
Diff
Raw Normal View History

diff --git a/node_modules/vscode-jsonrpc/lib/common/messageReader.js b/node_modules/vscode-jsonrpc/lib/common/messageReader.js
index 99e3dea..c8fc01c 100644
--- a/node_modules/vscode-jsonrpc/lib/common/messageReader.js
+++ b/node_modules/vscode-jsonrpc/lib/common/messageReader.js
@@ -136,6 +136,9 @@ class ReadableStreamMessageReader extends AbstractMessageReader {
}
const contentLength = headers.get('content-length');
if (!contentLength) {
+ const bodyBuffer = this.buffer.tryReadBody(this.buffer._totalLength);
+ const bodyString = bodyBuffer.toString();
+ console.log(`[LSP Debug] ERROR: Body - ${bodyString}`);
this.fireError(new Error('Header must provide a Content-Length property.'));
return;
}