Skip to content

Commit 02167d7

Browse files
authored
Merge pull request #2590 from github/henrymercer/fix-empty-header
Do not pass undefined authorization header
2 parents 4dc1519 + 682c2f7 commit 02167d7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
66

77
## [UNRELEASED]
88

9-
No user facing changes.
9+
- Fixed an issue where setting up the CodeQL tools would sometimes fail with the message "Invalid value 'undefined' for header 'authorization'". [#2590](https://github.com/github/codeql-action/pull/2590)
1010

1111
## 3.27.1 - 08 Nov 2024
1212

lib/tools-download.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-download.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tools-download.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ async function downloadAndExtractZstdWithStreaming(
178178
logger: Logger,
179179
): Promise<string> {
180180
headers = Object.assign(
181-
{ "User-Agent": "CodeQL Action", authorization },
181+
{ "User-Agent": "CodeQL Action" },
182+
authorization ? { authorization } : {},
182183
headers,
183184
);
184185
const response = await new Promise<IncomingMessage>((resolve) =>

0 commit comments

Comments
 (0)