[Pkg-javascript-commits] [sockjs-client] 139/350: Check protocol properly

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:03:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 70bcd198c8fd1abc678053b6c92e67f57e7b82f4
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Wed Oct 15 13:03:00 2014 -0400

    Check protocol properly
---
 lib/main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/main.js b/lib/main.js
index 7d4d158..f851652 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -50,7 +50,7 @@ function SockJS(url, protocols, transportsWhitelist) {
     throw new SyntaxError("The URL '" + url + "' is invalid");
   } else if (parsedUrl.search || parsedUrl.hash) {
     throw new SyntaxError('The URL must not contain a query string or fragment');
-  } else if (parsedUrl.protocol !== 'http:' && parsedUrl !== 'https:') {
+  } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
     throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list