Skip to content

Fix issue with file in path - #82

Merged
leo merged 3 commits into
vercel:masterfrom
AxlLind:internal-error-fix
Jun 19, 2019
Merged

Fix issue with file in path#82
leo merged 3 commits into
vercel:masterfrom
AxlLind:internal-error-fix

Conversation

@AxlLind

@AxlLind AxlLind commented Mar 28, 2019

Copy link
Copy Markdown
Contributor

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

Resolves #80

@codecov

codecov Bot commented Mar 28, 2019

Copy link
Copy Markdown

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
Copy Markdown

Nice PR! Would love if this could be merged!

Comment thread src/index.js
stats = await handlers.stat(absolutePath);
} catch (err) {
if (err.code !== 'ENOENT') {
if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') {

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

AxlLind commented Apr 2, 2019

Copy link
Copy Markdown
Contributor Author

@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

@leo leo left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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