Only first header value gets used and all other headers are thrown away on nightly Neovim
Prerequisites
- [X] I am using the latest stable release of Neovim
- [X] I am using the latest version of the plugin
Neovim Version
NVIM v0.11.0-dev-946+g25665b365
Operating system/version
Manjaro Linux x86_64
Actual behavior
Only the first header value is included in requests.
Expected behavior
All header values are included in the request. Expected output of :Rest curl yank:
curl -sL 'https://httpbin.org/headers' '-X' 'GET' '-H' 'Foo: foo' '-H' 'Bar: bar' '-H' 'Baz: baz' '-b' 'testcookie=foo'
Steps to reproduce
-
Use the following request:
GET https://httpbin.org/headers Foo: foo Bar: bar Baz: baz -
:Rest curl yankgives the output (notice how there's only one'-H'):curl -sL 'https://httpbin.org/headers' '-X' 'GET' '-H' 'Foo: foo' '-b' 'testcookie=foo'
Other information
I clicked "I am using the latest stable release of Neovim" because I had to to create this issue, even though I'm on nightly. I figured this could potentially be a breaking change in Neovim that rest.nvim might have to adapt to.
Repro (lazy.nvim)
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
"rest-nvim/rest.nvim",
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
main = "nvim-treesitter.configs",
opts = {
ensure_installed = { "http" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
},
},
},
})
Thank you for your report! This seems to be a nightly bug. I opened an issue in neovim repo.
Upstream issue seems to be fixed now: https://github.com/neovim/neovim/issues/30792
If anyone is seeing this bug, update to latest nightly or stay on stable release (v0.10)