Comments (7)
I would like to switch to net::http, we can remove faraday once we implement a proper redirect:
https://github.com/lostisland/faraday_middleware/blob/master/lib/faraday_middleware/response/follow_redirects.rb
from puppet-archive.
In older issues I saw you also had ideas to remove faraday. Did you start with this?
from puppet-archive.
I started working on #55, but got hanged up because of the redirect issue.
from puppet-archive.
+1
Perhaps a simpler solution is enough:
We only need to support HTTP GET, right?
from puppet-archive.
I've been looking into this. I'm guessing issue #55 is caused by the standard Net::HTTP
class and not by Faraday. It looks like Net::HTTP
is reading the whole response object into memory, causing memory problems when working with big files. So when we replace Faraday by our own solution, we also have to be careful not to keep the same problem.
Wouldn't it be easier to use wget
. This would still introduce a dependency, but this is a rpm dependency that, most of the times is much easier. The advantage would be a battle tested en tried http
/ftp
and https
implementation.
It supports a lot of stuff, for example:
- retries
- limit rate. This could be useful when downloading files on fragile networks
- proxies
- redirects
from puppet-archive.
This module was originally written to handle both windows/linux. A native ruby solution worked better than being dependent on a package that I could not install in windows. Both wget/curl can be implemented as providers to supplement the default provider (or even default providers on Linux). The util portion can be moved to download method so the default provider can be the parent provider with the download method replaced with your preferred solution on platforms where it's suitable.
from puppet-archive.
Sorry. Forgot about Windows for a moment ;-). I'll have my stab at making a provider for unix wget.
from puppet-archive.
Related Issues (20)
- Do not add auth and cookie header when redirecting HOT 2
- Example in README doesn't make sense.
- uninitialized constant PuppetX::Bodeco::PUPPET HOT 4
- add support for Ubuntu 22.04
- Changing back and forth between different version of an archive does not re-extract HOT 1
- Enhancement: allow multiple sources
- curl provider: array of multiple headers does not work HOT 2
- Checksum not being verified HOT 1
- Files unpacked in `/tmp` HOT 2
- Missing gem with ruby 3.1 HOT 13
- Artifactory has no authentication for latest url and checksum
- Allow passwords to be deferred
- archive does not enforce `owner:group` HOT 2
- archive has stopped working for us HOT 4
- weird issue with the proxy settings if 'proxy_server' seems to be set not fully correct
- archive module reveals sensitive information
- Provider curl to wget
- archive extraction fails
- Add support for Azure Blob Storage HOT 1
- Feature request: Add support for username|password to be passed as Sensitive[String]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-archive.