Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix checking for http via host option. #46

Merged
merged 1 commit into from
Sep 28, 2016
Merged

Fix checking for http via host option. #46

merged 1 commit into from
Sep 28, 2016

Conversation

jonnywilliamson
Copy link
Contributor

When checking for which http protocol to use, the "host" option in the json file is tested to see if it starts with https or http

However, if the host option DOES start with either of those, the script throws a Error: getaddrinfo ENOTFOUND error. See tech info here.

So removing the protocol from the host options means we must use something else to check for http(s). This patch uses the protocol option in the json file. First suggested by https://github.com/Thaars

When checking for which http protocol to use, the "host" option in the json file is tested to see if it starts with `https` or `http`

However, if the host option DOES start with either of those, the script throws a `Error: getaddrinfo ENOTFOUND` error. See [tech info here](http://stackoverflow.com/a/17691556/659786).

So removing the protocol from the `host` options means we must use something else to check for http(s). This patch uses the `protocol` option in the json file. First suggested by https://github.com/Thaars
@tlaverdure
Copy link
Owner

Ok, thanks!

@tlaverdure tlaverdure merged commit fa727ea into tlaverdure:master Sep 28, 2016
@jonnywilliamson jonnywilliamson deleted the patch-2 branch September 29, 2016 11:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants