mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-06-05 23:16:47 +00:00
Tests: Replace space with dash in header name
Node.js has forbidden header names with spaces in
6192c9892f.
The next error is thrown when the test sets the "some header" header:
Uncaught TypeError: Header name must be a valid HTTP Token ["some header"]
To fix it, replace spaces with dashes.
This commit is contained in:
@@ -59,7 +59,7 @@ describe('memory usage', function() {
|
||||
cors_api_url + 'http://127.0.0.1:' + server.address().port);
|
||||
request.agent = false; // Force Connection: Close
|
||||
request.headers = {
|
||||
'Long header': new Array(requestSize * 1e3).join('x'),
|
||||
'Long-header': new Array(requestSize * 1e3).join('x'),
|
||||
};
|
||||
(function requestAgain() {
|
||||
if (remaining-- === 0) {
|
||||
|
||||
Reference in New Issue
Block a user