don't exclude cookies from request headers when importing from curl (#2748)

This commit is contained in:
Joel Wetzell 2024-08-05 01:57:00 -05:00 committed by GitHub
parent 2b0d55ce6b
commit adb843faa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,11 +72,10 @@ const parseCurlCommand = (curlCommand) => {
parsedArguments.header.forEach((header) => { parsedArguments.header.forEach((header) => {
if (header.indexOf('Cookie') !== -1) { if (header.indexOf('Cookie') !== -1) {
cookieString = header; cookieString = header;
} else { }
const components = header.split(/:(.*)/); const components = header.split(/:(.*)/);
if (components[1]) { if (components[1]) {
headers[components[0]] = components[1].trim(); headers[components[0]] = components[1].trim();
}
} }
}); });
} }