diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-04-25 14:54:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-04-25 14:54:54 +0100 |
commit | c3eddd2068620ceb4e475961192c1d8cae3350cd (patch) | |
tree | 8053af0440fc4d98d0f255e4f40d39e6c273b2ab /src/testdir/test_channel_lsp.py | |
parent | cfc788c38848adcd54e4130f16f2813cd1e215dd (diff) |
patch 9.0.1487: Content-type header for LSP channel not according to specv9.0.1487
Problem: Content-type header for LSP channel not according to spec.
Solution: Use "vscode-jsonrpc" instead of "vim-jsonrpc". (Yegappan
Lakshmanan, closes #12295)
Diffstat (limited to 'src/testdir/test_channel_lsp.py')
-rw-r--r-- | src/testdir/test_channel_lsp.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testdir/test_channel_lsp.py b/src/testdir/test_channel_lsp.py index 10b4fb43f3..dd107be157 100644 --- a/src/testdir/test_channel_lsp.py +++ b/src/testdir/test_channel_lsp.py @@ -35,7 +35,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): v['id'] = msgid s = json.dumps(v) resp = "Content-Length: " + str(len(s)) + "\r\n" - resp += "Content-Type: application/vim-jsonrpc; charset=utf-8\r\n" + resp += "Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n" resp += "\r\n" resp += s if self.debug: @@ -46,7 +46,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): v = 'wrong-payload' s = json.dumps(v) resp = "Content-Length: " + str(len(s)) + "\r\n" - resp += "Content-Type: application/vim-jsonrpc; charset=utf-8\r\n" + resp += "Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n" resp += "\r\n" resp += s self.request.sendall(resp.encode('utf-8')) @@ -60,7 +60,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): def send_empty_payload(self): resp = "Content-Length: 0\r\n" - resp += "Content-Type: application/vim-jsonrpc; charset=utf-8\r\n" + resp += "Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n" resp += "\r\n" self.request.sendall(resp.encode('utf-8')) @@ -71,7 +71,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): resp = "Host: abc.vim.org\r\n" resp += "User-Agent: Python\r\n" resp += "Accept-Language: en-US,en\r\n" - resp += "Content-Type: application/vim-jsonrpc; charset=utf-8\r\n" + resp += "Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n" resp += "Content-Length: " + str(len(s)) + "\r\n" resp += "\r\n" resp += s @@ -93,7 +93,7 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): # test for sending the http header without length v = {'jsonrpc': '2.0', 'id': msgid, 'result': resp_dict} s = json.dumps(v) - resp = "Content-Type: application/vim-jsonrpc; charset=utf-8\r\n" + resp = "Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n" resp += "\r\n" resp += s self.request.sendall(resp.encode('utf-8')) |