Skip to content

Directory listing has broken links#124

Merged
hueniverse merged 3 commits intohapijs:masterfrom
MariiaZimokha:broken-links
Sep 12, 2019
Merged

Directory listing has broken links#124
hueniverse merged 3 commits intohapijs:masterfrom
MariiaZimokha:broken-links

Conversation

@MariiaZimokha
Copy link
Copy Markdown

I came across with this issue #119.
As was described, when we hit top level path, then links are built incorrectly "/logstrace_context.log".
It's just happening when stripTrailingSlash is set true or last slash is omitted.

We need to be sure when we hit top level path, we have slash at the end of it.

Tests were added and coverage wasn't decreased.

}
});

const res = await server.inject('/showindex/');
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

To see an error, just delete last /

const res = await server.inject('/showindex');

@hueniverse hueniverse self-assigned this Sep 12, 2019
@hueniverse hueniverse added the bug Bug or defect label Sep 12, 2019
@hueniverse hueniverse merged commit 3a1d137 into hapijs:master Sep 12, 2019
@hueniverse hueniverse added this to the 5.2.2 milestone Sep 12, 2019
@lock
Copy link
Copy Markdown

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
@MariiaZimokha MariiaZimokha deleted the broken-links branch March 14, 2020 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants