dotnet / install-scripts

MIT License
127 stars 70 forks source link

Add HTTP head log entry #382

Closed donJoseLuis closed 11 months ago

donJoseLuis commented 11 months ago

getting the targeted file size can offer insight into the corrupt bits observed in vscode regional cases.

exit criteria

  1. NEW STEP: resolve targeted URI to download
  2. NEW STEP: make HTTP head request for URI
  3. NEW STEP: log the content-length header (file size in bits)
  4. download the target (as it currently works)
  5. NEW STEP: log the downloaded file size in bits
  6. continue with installation

Example of http head for resolved URI:

curl --head https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.100-preview.7.23376.3/dotnet-sdk-8.0.100-preview.7.23376.3-win-x64.zip HTTP/1.1 200 OK Accept-Ranges: bytes Age: 442119 Content-Type: application/octet-stream Date: Fri, 25 Aug 2023 10:54:09 GMT Etag: 0x8DB9808765EAB0C Last-Modified: Tue, 08 Aug 2023 12:10:31 GMT Server: ECAcc (frc/4CA2) X-Cache: HIT x-ms-blob-type: BlockBlob x-ms-lease-status: unlocked x-ms-request-id: 0b2a2b71-801e-0017-0e3d-d3f80a000000 x-ms-version: 2009-09-19 Content-Length: 281161152