opengoal-vscode/.yarn/patches/vscode-jsonrpc-npm-8.1.0-557f20ee72.patch

15 lines
826 B
Diff

diff --git a/lib/common/messageReader.js b/lib/common/messageReader.js
index 99e3dea72d23baacef1a4ced34feedcc6b0cc9f2..c8fc01ca1cfe40f5af0a94eb649ee888bc10bee6 100644
--- a/lib/common/messageReader.js
+++ b/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;
}