Skip to content

Commit

Permalink
Wrong permanent redirect status code
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Sep 4, 2015
1 parent 096cd9f commit d2f5590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/command/check.py
Expand Up @@ -257,9 +257,9 @@ def analyze(self, fname, find_sources=False, check_remote=False):
if not check_remote or parsed.scheme not in ["http", "https"]:
continue
if target in self.checked_remote_targets: # already checked this exact target
if self.checked_remote_targets[target] in [301, 307]:
if self.checked_remote_targets[target] in [301, 308]:
self.logger.warn("Remote link PERMANENTLY redirected in {0}: {1} [Error {2}]".format(filename, target, self.checked_remote_targets[target]))
elif self.checked_remote_targets[target] in [302, 308]:
elif self.checked_remote_targets[target] in [302, 307]:
self.logger.info("Remote link temporarily redirected in {1}: {2} [HTTP: {3}]".format(filename, target, self.checked_remote_targets[target]))
elif self.checked_remote_targets[target] > 399:
self.logger.error("Broken link in {0}: {1} [Error {2}]".format(filename, target, self.checked_remote_targets[target]))
Expand Down

0 comments on commit d2f5590

Please sign in to comment.