Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
registry: make sure cache-control stuff is lowercase idk
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Feb 3, 2017
1 parent 32c83f4 commit a2a119d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/registry/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ function getStream (uri, registry, opts) {
function isStale (meta, opts) {
if (!meta ||
!meta.time ||
meta.cacheControl === 'immutable' ||
opts.preferOffline || opts.offline) {
(meta.cacheControl && meta.cacheControl.toLowerCase() === 'immutable') ||
opts.preferOffline ||
opts.offline) {
opts.log.silly('registry.get', 'skipping staleness check for')
return false
} else {
Expand Down

0 comments on commit a2a119d

Please sign in to comment.