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 issue with file in path #82

Merged
merged 3 commits into from
Jun 19, 2019
Merged

Fix issue with file in path #82

merged 3 commits into from
Jun 19, 2019

Conversation

AxlLind
Copy link
Contributor

@AxlLind AxlLind commented Mar 28, 2019

Fixes error described in #80. See issue for problem description.

Resolves #80

@codecov
Copy link

codecov bot commented Mar 28, 2019

Codecov Report

Merging #82 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #82   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         320    320           
=====================================
  Hits          320    320
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1368bf...853c2e8. Read the comment docs.

@JohanBengtsson
Copy link

Nice PR! Would love if this could be merged!

@@ -582,7 +582,7 @@ module.exports = async (request, response, config = {}, methods = {}) => {
try {
stats = await handlers.stat(absolutePath);
} catch (err) {
if (err.code !== 'ENOENT') {
if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') {
Copy link

Choose a reason for hiding this comment

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

Wouldn't this cause problems with rewrites? When there directory might not exist but a rewrite for it does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow, could you provide an example of what you mean?

Copy link

Choose a reason for hiding this comment

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

Thought there would be problems with such config where static/b doesn't exist

await handler(req, res, {
  'rewrites': [
    {source: 'static/b/**', destination: '/static/index.html'}
  ],
});

But can confirm, no such problem, my bad.

@AxlLind
Copy link
Contributor Author

AxlLind commented Apr 2, 2019

@leo You seem to be the maintainer to pinging you.

We get errors in our production logs from this. Would be really great if we could merge this, seems like a safe deploy to me.

@leo leo changed the title Fix issue with file in path (#80) Fix issue with file in path Jun 19, 2019
Copy link
Contributor

@leo leo left a comment

Choose a reason for hiding this comment

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

Thank you!

@leo leo merged commit 39253fb into vercel:master Jun 19, 2019
@JohanBengtsson
Copy link

@leo thanks!

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.

Internal error on paths like '/static/a/abc' if 'a' is a file
4 participants