Skip to content

Commit

Permalink
Merge pull request #2590 from github/henrymercer/fix-empty-header
Browse files Browse the repository at this point in the history
Do not pass undefined authorization header
  • Loading branch information
henrymercer authored Nov 12, 2024
2 parents 4dc1519 + 682c2f7 commit 02167d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

No user facing changes.
- 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)

## 3.27.1 - 08 Nov 2024

Expand Down
2 changes: 1 addition & 1 deletion lib/tools-download.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tools-download.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/tools-download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ async function downloadAndExtractZstdWithStreaming(
logger: Logger,
): Promise<string> {
headers = Object.assign(
{ "User-Agent": "CodeQL Action", authorization },
{ "User-Agent": "CodeQL Action" },
authorization ? { authorization } : {},
headers,
);
const response = await new Promise<IncomingMessage>((resolve) =>
Expand Down

0 comments on commit 02167d7

Please sign in to comment.