Skip to content

plenary.curl breaks headers if _ is required in header name #675

Description

@V1OL3TF0X

I have a service that requires a header with an _ in it's name. (Think CUSTOM_AUTH_HEADER or smth like that). I wanted to test it through a library that uses plenary.curl, and found that the request returns 404: upon closer inspection it turned out that the culprit is this line:

https://github.com/nvim-lua/plenary.nvim/blob/master/lua/plenary/curl.lua#L101

turning my header into CUSTOM-AUTH-HEADER, therefore making the request invalid. Is there a way to override this? As far as I know the HTTP spec doesn't enforce - over _, so I'd like to have a solution (or at least know why this mapping was made).

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions