0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.1487: Content-type header for LSP channel not according to spec

Problem:    Content-type header for LSP channel not according to spec.
Solution:   Use "vscode-jsonrpc" instead of "vim-jsonrpc". (Yegappan
            Lakshmanan, closes #12295)
This commit is contained in:
Yegappan Lakshmanan
2023-04-25 14:54:54 +01:00
committed by Bram Moolenaar
parent cfc788c388
commit c3eddd2068
4 changed files with 10 additions and 7 deletions

View File

@@ -103,9 +103,10 @@ json_encode_lsp_msg(typval_T *val)
ga_append(&ga, NUL);
ga_init2(&lspga, 1, 4000);
// Header according to LSP specification.
vim_snprintf((char *)IObuff, IOSIZE,
"Content-Length: %u\r\n"
"Content-Type: application/vim-jsonrpc; charset=utf-8\r\n\r\n",
"Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n\r\n",
ga.ga_len - 1);
ga_concat(&lspga, IObuff);
ga_concat_len(&lspga, ga.ga_data, ga.ga_len);