Skip to content
Permalink
Browse files

Wrong permanent redirect status code

  • Loading branch information
da2x committed Sep 4, 2015
1 parent 096cd9f commit d2f55901f0db770752be44f868e2c742f3c250d3
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/plugins/command/check.py
@@ -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]))

0 comments on commit d2f5590

Please sign in to comment.