Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a869dadb46aa
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f5c3bce9ec59
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on May 15, 2018

  1. Copy the full SHA
    6d837d0 View commit details
  2. Merge pull request #3093 from tbm/improve-440

    Show missing file when 404 occurs with serve
    Kwpolska authored May 15, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f5c3bce View commit details
Showing with 4 additions and 1 deletion.
  1. +3 −0 CHANGES.txt
  2. +1 −1 nikola/plugins/command/serve.py
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ Changes since Beta 2
Features
--------

* Show the filename of the missing file when ``nikola serve`` can't
find a file (i.e. when an 404 error occurs).

Bugfixes
--------

2 changes: 1 addition & 1 deletion nikola/plugins/command/serve.py
Original file line number Diff line number Diff line change
@@ -245,7 +245,7 @@ def send_head(self):
# transmitted *less* than the content-length!
f = open(path, 'rb')
except IOError:
self.send_error(404, "File not found")
self.send_error(404, "File not found: {}".format(path))
return None

filtered_bytes = None