Skip to content

Commit

Permalink
Fix GitHub Actions Cache setting an incorrect Content-Range header
Browse files Browse the repository at this point in the history
Content-Range is 0 indexed, although nobody seemed to have encountered
any issues as a result of this on github.com, but on GitHub Enterprise
server it resulted in a InvalidChunkException error
  • Loading branch information
j-mie committed Jan 15, 2025
1 parent e70b618 commit 3acca5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vcpkg/binarycaching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ namespace
m_token_header,
m_accept_header.to_string(),
"Content-Type: application/octet-stream",
"Content-Range: bytes 0-" + std::to_string(cache_size) + "/*",
"Content-Range: bytes 0-" + std::to_string(cache_size - 1) + "/*",
};

PrintingDiagnosticContext pdc{msg_sink};
Expand Down

0 comments on commit 3acca5c

Please sign in to comment.