Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

return correct file in dir if dir has same name as file #6569

Merged
merged 5 commits into from Nov 24, 2017

Conversation

Crunch09
Copy link
Member

  • bar.html
  • bar
    |- baz.html

GET /bar/
Before: Returns bar.html
After: Returns bar.html

GET /bar/baz
Before: Returns bar.html
After: Returns bar/baz.html

GET /bar/whatever
Before: Returns bar.html
After: Returns 404

This fixes #6475. Thanks @janpio for the great reproduction script! 馃憤

cc: @jekyll/build

- bar.html
- bar
  |- baz.html

_GET /bar/_
_Before:_ Returns bar.html
_After:_  Returns bar.html

_GET /bar/baz_
_Before:_ Returns bar.html
_After:_  Returns bar/baz.html

_GET /bar/whatever_
_Before:_ Returns bar.html
_After:_  Returns 404

This fixes jekyll#6475
@DirtyF DirtyF added the fix label Nov 19, 2017
@DirtyF DirtyF added this to the v3.7.0 milestone Nov 19, 2017
@ashmaroli
Copy link
Member

@Crunch09 Does this address #6222 as well (resolved via #6231). I think you should test for that case as well, if this doesn't already..

@Crunch09
Copy link
Member Author

@ashmaroli Yes, this is checked by this test.

@parkr
Copy link
Member

parkr commented Nov 20, 2017

Have you verified this against GitHub Pages? Ideally we'd keep this server behaviour the same, especially around an edge case like this which is confusing to users.

@Crunch09
Copy link
Member Author

@parkr Checked the current Github-Pages behavior with https://janpio.github.io/jekyll-path-test/ (provided by @janpio ). After this PR, webrick should have the same behavior.

Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 馃憤

@DirtyF
Copy link
Member

DirtyF commented Nov 24, 2017

@jekyllbot: merge +bug

@jekyllbot jekyllbot merged commit 368fa1f into jekyll:master Nov 24, 2017
jekyllbot added a commit that referenced this pull request Nov 24, 2017
@Crunch09 Crunch09 deleted the directory_file_mix_up branch November 24, 2017 09:35
DirtyF pushed a commit that referenced this pull request Dec 7, 2017
DirtyF pushed a commit that referenced this pull request Dec 7, 2017
@jekyll jekyll locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants