max-mapper / nugget

minimalist wget clone written in node. HTTP GET files and downloads them into the current directory
BSD 3-Clause "New" or "Revised" License
167 stars 30 forks source link

Honor NPM's cafile configuration #11

Closed mschnee closed 2 years ago

mschnee commented 8 years ago

If you are behind a corporate firewall with a self-signed certificate, the correct way to configure node and npm is to use npm config set cafile="/path/to/cert.pem"

This PR honors this configuration being passed to the request library in the same manner that node-gyp does (using the same readCAFile function, to boot)

max-mapper commented 8 years ago

nice, two questions:

mschnee commented 8 years ago

I'll look into readFileSync ->readFile with a clean head in the morning: I was essentially copying some of node-gyp's code over as-is. Apologies for taking the lazy approach ;)

As for the test: yes, it can be tested by setting up a small local server and ensuring both sides behave. Again, node-gyp to the rescue (https://github.com/nodejs/node-gyp/commit/8c4b0ffa503aa385f4186e028542dcedca2efeee)

I will create the test.

sla89 commented 6 years ago

@maxogden Any chance that this will be merged as is when the conflicts get solved? We really need this.

mschnee commented 2 years ago

Closing as abandoned :(