diff options
author | 2017-10-25 12:47:34 +0000 | |
---|---|---|
committer | 2017-10-25 12:47:34 +0000 | |
commit | 0327e655a3cb876dff4d9e320eb520077a82f874 (patch) | |
tree | fbeb6f784bbf3d35f3bc34dcaadb4826e9dfdaa9 /vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js | |
parent | e8ddb8424f0a6ecf0a1b46ca46f01872b6294bcd (diff) |
Fix license issues reported by Steve
Removed node_modules from gerrit and added during installation
Change-Id: I616da4ca564724b5cd496849383c62ca121794ac
Jira:VNFSDK-115
Signed-off-by: Murali <murali.p@huawei.com>
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js')
-rw-r--r-- | vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js deleted file mode 100644 index f1edd71f..00000000 --- a/vnfmarket/src/main/webapp/vnfmarket/node_modules/xmlhttprequest/tests/test-exceptions.js +++ /dev/null @@ -1,62 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest(); - -// Test request methods that aren't allowed -try { - xhr.open("TRACK", "http://localhost:8000/"); - console.log("ERROR: TRACK should have thrown exception"); -} catch(e) {} -try { - xhr.open("TRACE", "http://localhost:8000/"); - console.log("ERROR: TRACE should have thrown exception"); -} catch(e) {} -try { - xhr.open("CONNECT", "http://localhost:8000/"); - console.log("ERROR: CONNECT should have thrown exception"); -} catch(e) {} -// Test valid request method -try { - xhr.open("GET", "http://localhost:8000/"); -} catch(e) { - console.log("ERROR: Invalid exception for GET", e); -} - -// Test forbidden headers -var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -for (var i in forbiddenRequestHeaders) { - try { - xhr.setRequestHeader(forbiddenRequestHeaders[i], "Test"); - console.log("ERROR: " + forbiddenRequestHeaders[i] + " should have thrown exception"); - } catch(e) { - } -} - -// Try valid header -xhr.setRequestHeader("X-Foobar", "Test"); - -console.log("Done"); |