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

Fixes --proxy without a protocol throwing an uncaught error #742

Merged
merged 9 commits into from Oct 13, 2021

Conversation

Ratcoder
Copy link
Contributor

@Ratcoder Ratcoder commented Oct 6, 2021

This fixes the issue where the --proxy would throw an uncaught error when used without specifying a protocol. The fix is having the server not allow you to use --proxy without specifying a valid protocol.

Fixes #451

bin/http-server Outdated Show resolved Hide resolved
bin/http-server Outdated Show resolved Hide resolved
bin/http-server Outdated Show resolved Hide resolved
@thornjad thornjad added the patch version Small, non-breaking, bug fix or trivial change label Oct 11, 2021
Ratcoder and others added 2 commits October 11, 2021 13:04
Co-authored-by: Jade Michael Thornton <jademichael@jmthornton.net>
Co-authored-by: Jade Michael Thornton <jademichael@jmthornton.net>
@Ratcoder
Copy link
Contributor Author

Is there anything else that needs changing? Is the test okay?

Copy link
Member

@thornjad thornjad left a comment

Choose a reason for hiding this comment

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

I like it! Just a merge conflict left to resolve, a different PR made an unrelated change in the same spot as you, just need to include both changes

@Ratcoder
Copy link
Contributor Author

The test fails with url lowercase but passes when it is uppercase. I'm not sure why that is.

@Ratcoder
Copy link
Contributor Author

I fixed it! The issue was a missing comma after the previous require statement. It should pass the tests now. (It did on my machine)

test/cli.test.js Outdated Show resolved Hide resolved
Co-authored-by: Jade Michael Thornton <jademichael@jmthornton.net>
@thornjad thornjad merged commit 93fbb75 into http-party:master Oct 13, 2021
@thornjad thornjad added this to the v14.0 milestone Oct 13, 2021
@thornjad thornjad added the fix label Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix patch version Small, non-breaking, bug fix or trivial change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxy option leads to uncaught exception if passed without protocol
2 participants