summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel_lsp.py
diff options
context:
space:
mode:
authorMagnus Groß <magnus@mggross.com>2023-08-27 00:49:51 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-27 11:11:22 +0200
commit8fbd9449e71f2ad93e594be575209a7424eb093e (patch)
tree4813e963e015ebaaa410c5426d48f606b1b555bd /src/testdir/test_channel_lsp.py
parent0db1ea481528917e64ff5cd2e3a6f26e0271d5db (diff)
patch 9.0.1790: Redundant LSP Content-Type headerv9.0.1790
Problem: The Content-Type header is an optional header that some LSP servers struggle with and may crash when encountering it. Solution: Drop the Content-Type header from all messages, because we use the default value anyway. Because pretty much all popular LSP clients (e.g. coc.nvim, VSCode) do not send the Content-Type header, the LSP server ecosystem has developed such that some LSP servers may even crash when encountering it. To improve compatibility with these misbehaving LSP servers, we drop this header as well. Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Magnus Groß <magnus@mggross.com>
Diffstat (limited to 'src/testdir/test_channel_lsp.py')
-rw-r--r--src/testdir/test_channel_lsp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/test_channel_lsp.py b/src/testdir/test_channel_lsp.py
index dd107be157..eccb8937f0 100644
--- a/src/testdir/test_channel_lsp.py
+++ b/src/testdir/test_channel_lsp.py
@@ -172,7 +172,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
def do_extra_hdr_fields(self, payload):
self.send_extra_hdr_fields(payload['id'], 'extra-hdr-fields')
- def do_delayad_payload(self, payload):
+ def do_delayed_payload(self, payload):
self.send_delayed_payload(payload['id'], 'delayed-payload')
def do_hdr_without_len(self, payload):
@@ -208,7 +208,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
'msg-specific-cb': self.do_msg_specific_cb,
'server-req': self.do_server_req,
'extra-hdr-fields': self.do_extra_hdr_fields,
- 'delayed-payload': self.do_delayad_payload,
+ 'delayed-payload': self.do_delayed_payload,
'hdr-without-len': self.do_hdr_without_len,
'hdr-with-wrong-len': self.do_hdr_with_wrong_len,
'hdr-with-negative-len': self.do_hdr_with_negative_len,