Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Metadata requested over HTTPS tells me to get the tarball over HTTP #218

Open
peterlynch opened this issue Jan 6, 2015 · 4 comments
Open

Comments

@peterlynch
Copy link

Original bounced issues:
npm/npm-www#915
npm/newww#390

If I am a savvy user and am using https://registry.npmjs.org (over HTTPS), and issue a metadata request like this one:
https://registry.npmjs.org/commonjs

The returned metadata will tell me to get the tarball over HTTP. What is the point of HTTPS then?

As I checked, both HTTP and HTTPS URLs works for tarball.

Another example:
https://registry.npmjs.org/htmlparser2

Expected: Metadata from a secure registry should not tell me to get any content from an insecure registry url, especially if the registry is the same host

@bcoe
Copy link
Contributor

bcoe commented Mar 27, 2015

@peterlynch the npm client itself requests URLs in https form. Since the both the http and the https scheme work, we've opted to store http in the meta-information.

@peterlynch
Copy link
Author

@bcoe you stated:

we've opted to store http in the meta-information

This appears inconsistent at the very least. Request this metadata

http://registry.npmjs.org/requirejs

It contains tarball URLS to https://registry.npmjs.org

@othiym23
Copy link
Contributor

othiym23 commented Apr 5, 2016

@peterlynch This has changed recently for the primary npm registry: http://blog.npmjs.org/post/142077474335/npm-registry-is-now-fully-https

This is not a change happening within the npm-registry-couchapp codebase, though. It was done by running a follower to update all of the package documents served by the primary registry to update dist.tarball.

@othiym23
Copy link
Contributor

othiym23 commented Apr 5, 2016

If you'd like to apply a similar process to your own registr{y,ies}, you can use normalize-registry-metadata to do so.

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

No branches or pull requests

3 participants