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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directory handler regressions in 2.1.1 #19

Merged
merged 3 commits into from Jan 26, 2015

Conversation

@kanongil
Copy link
Member

kanongil commented Jan 26, 2015

No description provided.

kanongil added 3 commits Jan 26, 2015
Fixes incorrect redirect response for permissionless files and other file open errors
return callback(Boom.forbidden(null, err.code));
}

if (path.indexOf('\u0000') !== -1) { // handle "Path must be a string without null bytes" error

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 26, 2015

Member

If you are going to perform this check on every success case, why not move it up before the open operation which is more expensive?

This comment has been minimized.

Copy link
@kanongil

kanongil Jan 26, 2015

Author Member

I placed it where it is, since it will only be called for what would otherwise be a internal error. This way it won't have any impact on normal responses.

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 26, 2015

Member

Ok. Comment should start with a Cap :-)

This comment has been minimized.

Copy link
@kanongil

kanongil Jan 26, 2015

Author Member

Ok, I'll remember that :-)

@hueniverse hueniverse self-assigned this Jan 26, 2015
@hueniverse hueniverse added the bug label Jan 26, 2015
@hueniverse hueniverse added this to the 2.1.2 milestone Jan 26, 2015
hueniverse added a commit that referenced this pull request Jan 26, 2015
Fix directory handler regressions in 2.1.1
@hueniverse hueniverse merged commit 2dd7eac into hapijs:master Jan 26, 2015
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.