Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Compressed App provider could better use the HTTP Protocol #9

Closed
lucadegasperi opened this issue Feb 20, 2013 · 4 comments
Closed

Compressed App provider could better use the HTTP Protocol #9

lucadegasperi opened this issue Feb 20, 2013 · 4 comments

Comments

@lucadegasperi
Copy link

I've noticed that the Compressed App provider checks what it has to download by only looking at the file extension. In my opinion it should indeed better use the HTTP headers the server sends back and only rely on the file extension as a fallback.
Why this change you would ask?
There are some app providers that do not provide a direct link to the compressed file, they do send a Content-Disposition: attachment; filename="App.zip" indeed.
Also, I think the script should follow HTTP redirects.

While I'm not a ruby developer, I would love someone taking care of this issue.

@wfarr
Copy link
Contributor

wfarr commented Mar 5, 2013

You can set a flavor param on the resource to specify whether to treat it as a zipball, tarball, etc.

We'd happily accept PRs to utilize the metadata to do some smarter inferencing or follow redirects.

@wfarr wfarr closed this as completed Mar 5, 2013
@bwnoll
Copy link

bwnoll commented Jan 24, 2014

I know this is an old comment, but FWIW, I was able to work around this issue luca pointed out simply by using flavor => 'zip' in the package declaration for a compressed_app package whose source url didn't end in .zip.

@njia
Copy link

njia commented Aug 6, 2014

@bwnoll Any chance you could provide an example ?

@typhonius
Copy link

Example for @njia

  package { 'name of package':
    provider => 'compressed_app',
    source   => 'https://www.packagelocation.com/example/no_file_extension',
    flavor   => 'zip',
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants