voxpupuli / puppet-archive

Compressed archive file download and extraction with native types/providers for Windows and Unix
https://forge.puppet.com/puppet/archive
Apache License 2.0
60 stars 178 forks source link

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

Closed sprankle closed 1 year ago

sprankle commented 1 year ago

Affected Puppet, Ruby, OS and module versions/distributions

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 commented 1 year ago

Looks like this is a bug in #475.

sprankle commented 1 year ago

483 adds tests for multiple headers to demonstrate the bug.