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

Explicit host header trumps host implied in url #246

merged 2 commits into from Apr 3, 2019


Copy link

ggoodman commented Apr 3, 2019

Fixes #245.

Fixes hapi/wreck#245.
test/index.js Outdated Show resolved Hide resolved
@@ -2013,19 +2027,19 @@ describe('Defaults', () => {
const wreckB = Wreck.defaults(optionsB);
const wreckAB = wreckA.defaults(optionsB);

const promise1 = wreckA.request('get', 'http://no_such_host_error/', { headers: { banana: 911 } });
const promise1 = wreckA.request('get', '', { headers: { banana: 911 } });

This comment has been minimized.

Copy link

geek Apr 3, 2019


why did this need to change?

This comment has been minimized.

Copy link

ggoodman Apr 3, 2019

Author Contributor

All of these tests were failing unpredictably on my machine because it was attempting to resolve that address and then connect. It seemed like expect(promise).to.throw() was not getting the rejection fast enough, resulting in the tests failing for opaque reasons unrelated to the behaviour they were testing.

@geek geek self-assigned this Apr 3, 2019
@geek geek added the bug label Apr 3, 2019
@geek geek added this to the 15.0.1 milestone Apr 3, 2019
@geek geek merged commit 57b30b8 into hapijs:master Apr 3, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.