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

Using posix path resolution. Resolves serve issue #525 #89

Merged
merged 1 commit into from
Jun 19, 2019

Conversation

joeldenning
Copy link
Contributor

@joeldenning joeldenning commented Jun 6, 2019

Resolves vercel/serve#525

path.resolve('/some-url') returns C:\\some-url in Windows. Which breaks rewrites and makes the serve --single option not work in windows.

Using path.posix gives us linux/unix/posix functionality for resolving the path, which preserves the security fix that was added in #76 while still working in Windows.

I have verified that the --single option works with my changes, in both Windows 10 and Mac.

@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #89   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         324    324           
=====================================
  Hits          324    324
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 b5f9463...0e13f04. Read the comment docs.

@Matt-J-Hosking
Copy link

I approve! :) Please get this one in.

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.

The tests are green. Thank you!

@leo leo merged commit 0bd3eff into vercel:master Jun 19, 2019
@joeldenning joeldenning deleted the serve-issue-525 branch June 24, 2019 19:28
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.

--single option is broken since 10.1.2
3 participants