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

curl provider: array of multiple headers does not work #481

Closed
sprankle opened this issue Jan 3, 2023 · 2 comments · Fixed by #482
Closed

curl provider: array of multiple headers does not work #481

sprankle opened this issue Jan 3, 2023 · 2 comments · Fixed by #482
Labels
bug Something isn't working

Comments

@sprankle
Copy link
Contributor

sprankle commented Jan 3, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Module version: 6.1.0

How to reproduce (e.g Puppet code you use)

  archive { "example.yml":
    path             => "/tmp/example.yml",
    source           => "https://github.com/examplefile.yml",
    extract_path     => /opt/new/dir,
    headers          => [
      'Accept: application/vnd.github.raw',
      "Authorization: Bearer ${github_token}",
    ],
    provider         => 'curl',
    cleanup          => false,
  }

What are you seeing

Only the first --header flag is available at execution
--header 'Accept: application/vnd.github.raw'

What behaviour did you expect instead

Repition of headers
--header 'Accept: application/vnd.github.raw' --header 'Authorization: Bearer xxx_example_token'

Output log

Any additional information you'd like to impart

@kenyon kenyon added the bug Something isn't working label Jan 3, 2023
@kenyon
Copy link
Member

kenyon commented Jan 3, 2023

Looks like this is a bug in #475.

@kenyon kenyon changed the title Curl headers support implementation issue curl provider: array of multiple headers does not work Jan 3, 2023
@sprankle
Copy link
Contributor Author

sprankle commented Jan 5, 2023

#483 adds tests for multiple headers to demonstrate the bug.

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

Successfully merging a pull request may close this issue.

2 participants