What happened?
Afternoon!
When calling ActionsArtifactClient.DownloadArtifact, the download is often, or always, redirected to another server that holds the actual artifact.
In my experience, if the artifact happens to sit on https://pipelinesghubeus10.actions.githubusercontent.com, then the Content-Type returned is application/zip and all is well, but if the artifact happens to reside on https://productionresultssa10.blob.core.windows.net, then the Content-Type is zip and it all starts to go wrong.
There's a check in HttpClientAdapter.BuildResponse for the content type, which fails, then the response is read as a string, not a stream, and Connection.GetRawStream attempts to cast the string as a stream, understandably gets null, and returns null to the caller.
Easy to fix badly; perhaps harder to fix well.
Versions
Octokit 10.0.0
Relevant log output
No response
Code of Conduct
What happened?
Afternoon!
When calling
ActionsArtifactClient.DownloadArtifact, the download is often, or always, redirected to another server that holds the actual artifact.In my experience, if the artifact happens to sit on https://pipelinesghubeus10.actions.githubusercontent.com, then the
Content-Typereturned isapplication/zipand all is well, but if the artifact happens to reside on https://productionresultssa10.blob.core.windows.net, then theContent-Typeiszipand it all starts to go wrong.There's a check in
HttpClientAdapter.BuildResponsefor the content type, which fails, then the response is read as a string, not a stream, andConnection.GetRawStreamattempts to cast the string as a stream, understandably gets null, and returns null to the caller.Easy to fix badly; perhaps harder to fix well.
Versions
Octokit 10.0.0
Relevant log output
No response
Code of Conduct