From 25b28c581972b7da3ac5322f5d95882f6ec85ed9 Mon Sep 17 00:00:00 2001 From: fizzyduck <46020783+fizzyduck@users.noreply.github.com> Date: Thu, 20 Dec 2018 14:32:09 +0000 Subject: [PATCH] Add follow-redirects package Handle 302 responses from the HTTP server. --- lib/xsd.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/xsd.coffee b/lib/xsd.coffee index 05fe9b5..70790c4 100644 --- a/lib/xsd.coffee +++ b/lib/xsd.coffee @@ -14,9 +14,9 @@ module.exports = # Get the protocol used to download the file. protocol = null if xsdUri.substr(0, 7) is "http://" - protocol = require 'http' + protocol = require 'follow-redirects'.http else if xsdUri.substr(0, 8) is "https://" - protocol = require 'https' + protocol = require 'follow-redirects'.https if protocol # Download the file