Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first header value gets used and all other headers are thrown away on nightly Neovim #485

Open
2 tasks done
mawkler opened this issue Oct 11, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@mawkler
Copy link

mawkler commented Oct 11, 2024

Prerequisites

  • I am using the latest stable release of Neovim
  • 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

  1. Use the following request:

    GET https://httpbin.org/headers
    Foo: foo
    Bar: bar
    Baz: baz
  2. :Rest curl yank gives 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 },
            },
        },
    },
})
@boltlessengineer
Copy link
Contributor

Thank you for your report!
This seems to be a nightly bug. I opened an issue in neovim repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants