Issue 1:
Describe the bug

I started to write JEST test run by nodejs 13.11. This statement was failing:

let response = await axios.get(`${API}/users/1234`, getAuthHeader());
function getAuthHeader() {
const config = { headers: { } };
config.headers.Authorization = "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxZTQwdjBiMWo1Iiwibmlja25hbWUiOiJsaXRlcmFrbCIsInB3ZFRpbWVzdGFtcCI6IjIwMjAtMDMtMjJUMTE6MTA6NDkuNDg2WiIsInJvbGVzIjpbImFkbWluOnBvbGwiXSwiaWF0IjoxNTg2NjkwNzc2LCJleHAiOjE1ODkzNjkxNzZ9.N5MfpZ9i9Sjv-izdYItR4gXCmzVkqkuVcVSEL_6Q89c";
return config;
}

with the following error:

Network Error
at createError (node_modules/axios/lib/core/createError.js:16:15)
at XMLHttpRequest.handleError (node_modules/axios/lib/adapters/xhr.js:83:14)
at XMLHttpRequest.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:33:32)
at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:316:27)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:267:3)
at XMLHttpRequestEventTargetImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:214:9)
at fireAnEvent (node_modules/jsdom/lib/jsdom/living/helpers/events.js:17:36)
at requestErrorSteps (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:121:3)
at Object.dispatchError (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:51:3)
at EventEmitter.<anonymous> (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:675:20)
at Request.<anonymous> (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:384:47)
at Request.onRequestError (node_modules/request/request.js:877:8)

Error: Error: Parse Error: Duplicate Content-Length
at Object.dispatchError (C:\Users\leos\WebstormProjects\nano-options\node_modules\jsdom\lib\jsdom\living\xhr-utils.js:54:19)
at EventEmitter.<anonymous> (C:\Users\leos\WebstormProjects\nano-options\node_modules\jsdom\lib\jsdom\living\xmlhttprequest.js:675:20)
at EventEmitter.emit (events.js:327:22)
at Request.<anonymous> (C:\Users\leos\WebstormProjects\nano-options\node_modules\jsdom\lib\jsdom\living\xhr-utils.js:384:47)
at Request.emit (events.js:315:20)
at Request.onRequestError (C:\Users\leos\WebstormProjects\nano-options\node_modules\request\request.js:877:8)
at ClientRequest.emit (events.js:315:20)
at Socket.socketOnData (_http_client.js:486:9)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:297:12) undefined

But when the stament was GET without AUTH header, the code was working well. The same request from Postman with AUTH header was working well too.

let response = await axios.get(`${API}/users/1234`);

Later I realized that Axios sends OPTIONS method instead of GET and server returns CORS headers, 200 status code, no data and content-length: '0'.

message: <ref *1> uWS.HttpResponse {
__request: uWS.HttpRequest {
rawPath: '/v1/users/:userId',
method: 'OPTIONS',
path: '/v1/users/1e5ngnj1e6',
url: '/v1/users/1e5ngnj1e6',
originalUrl: '/v1/users/1e5ngnj1e6',
baseUrl: '',
__response: [Circular *1],
getIP: [Function: getIP],
headers: {
origin: 'http://localhost',
'access-control-request-method': 'GET',
'access-control-request-headers': 'Authorization',
'user-agent': 'Mozilla/5.0 (win32) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/15.2.1',
host: '192.168.157.241:3000',
'content-length': '0',
connection: 'keep-alive'
},
cookies: undefined,
params: { userId: '1e5ngnj1e6' },
query: undefined
},
rawStatusCode: 200,
config: {
host: '0.0.0.0',
port: 3000,
https: false,
configureAjv: undefined,
setAjv: [Function (anonymous)],
swagger: undefined,
_errorHandler: [Function (anonymous)],
_notFoundHandler: [Function (anonymous)]
},
abortHandler: true
},

Then a guy on StackOverflow asked me for NodeJS version. When I downgraded to NodeJS v12.16.2, this error disappeared. But I still see only OPTIONS method and GET does not follow.

To Reproduce

Here is the minimum reproducible repository: https://github.com/literakl/nano-options/blob/master/api.int.test.js

Expected behavior

GET with Authorization header will be sent to server. The same code works for me well with Vue in Chrome browser.

Environment:

Axios Version 0.19.2

OS: Windows 10

Browser N/A

Browser Version N/a

Additional Library Versions NodeJS 13.11, 12.16.2

Additional context/Screenshots

https://stackoverflow.com/questions/61173165/duplicate-content-length-with-axios-running-in-jest#61173165

Issue 2:
#### Summary

The following node.js app using Axios works correctly on Windows and Mac:

var SERVER_URL = 'http://localhost:3000';

var axios = require("axios");

function getBooks() {
return axios
.get(SERVER_URL + '/books')
.then(function(response) {
return response.data;
});
}

getBooks()
.then(function(books) {
console.log(JSON.stringify(books, null, ' '));
});

However, if I run it on a Windows 7 or Windows 10 VDI (essentially a virtual machine), it fails with the following error message:

(node:12000) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Request failed with status code 504

If I replace the axios call with node-fetch, the error goes away and the fetch works. What could be the problem with axios or the way I am using it?

#### Context

axios version: v0.16.2

Environment: node v6.11.0, windows 7, Windows 10 running in a VDI