Skip to content

Fix serving of files from extension-less URLs#54

Closed
vslavik wants to merge 1 commit into
hexojs:masterfrom
vslavik:patch-1
Closed

Fix serving of files from extension-less URLs#54
vslavik wants to merge 1 commit into
hexojs:masterfrom
vslavik:patch-1

Conversation

@vslavik

@vslavik vslavik commented Sep 6, 2018

Copy link
Copy Markdown

Previously all URLs in the form of foo were redirected to foo/, even if foo/index.html didn't exist. This broke handling of such requests when foo.html exists.

Fixed by checking if the foo/ URL is a valid one before redirecting to it.

@coveralls

coveralls commented Sep 6, 2018

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-5.3%) to 88.991% when pulling 50625d4 on vslavik:patch-1 into 6186d23 on hexojs:master.

@vslavik

vslavik commented Sep 6, 2018

Copy link
Copy Markdown
Author

I'm sorry, this only works with static files pre-generated; more work is required. Will update shortly.

Previously all URLs in the form of `foo` were redirected to `foo/`,
even if `foo/index.html` didn't exist. This broke handling of such
requests when `foo.html` exists.

Fixed by checking if the `foo/` URL is a valid one before redirecting
to it.
@vslavik

vslavik commented Nov 26, 2018

Copy link
Copy Markdown
Author

Sorry, I forgot to push the updated version — done now.

@vslavik

vslavik commented Jul 20, 2020

Copy link
Copy Markdown
Author

Closing because equivalent #111 was merged in the two years since I opened this PR.

@vslavik vslavik closed this Jul 20, 2020
@vslavik vslavik deleted the patch-1 branch July 20, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants