Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add https binary cache #558

Merged
merged 4 commits into from
Jun 14, 2022
Merged

Conversation

autoantwort
Copy link
Contributor

This can be used to use gitlab generic packages as binary cache.

We could also allow http.

Maybe we should replace the header field by 'options to curl'. Then the -u option or multiple headers could be used.

@autoantwort autoantwort marked this pull request as ready for review May 25, 2022 06:51
@Osyotr
Copy link

Osyotr commented May 26, 2022

http support can be useful when pushing/fetching from internal server

@BillyONeal BillyONeal merged commit 34c1a13 into microsoft:main Jun 14, 2022
@BillyONeal
Copy link
Member

Thanks!

@BillyONeal
Copy link
Member

This completely broke binary caching for x-azblob because it causes curl command lines like:

curl --create-dirs --location -w "5ec47b8e-6776-4d70-b9b3-ac2a57bc0a1c %{http_code}\n" "https://vcpkgbinarycacheeastasia.blob.core.windows.net/cache/06db868bb3ae7a8a4d85685d799e0630d91a4594b9c1caa6dac361a42a46c407.zip?SAS" -o "C:\Dev\vcpkg\buildtrees\vcpkg-cmake\x64-windows.zip" -H "x-ms-version: 2020-04-08" -H "x-ms-blob-type: BlockBlob" "https://vcpkgbinarycacheeastasia.blob.core.windows.net/cache/dcc66cf2da4a2a8f4526bd8f779c455afb9eca970749bd0a123f8f1152b18630.zip?SAS" -o "C:\Dev\vcpkg\buildtrees\zlib\x86-windows.zip" -H "x-ms-version: 2020-04-08" -H "x-ms-blob-type: BlockBlob"

Note that -H is duplicated. https://curl.se/docs/manpage.html#-H -H is sent for all requests, not per-url like this appears to be trying to do.

@BillyONeal
Copy link
Member

image

@autoantwort
Copy link
Contributor Author

This are actually two issues:

  1. Headers are send twice
  2. azure blob headers meant for put requests are also send in get requests (I didn't know that and thought it would be ok to also send them in get requests)

I have fixed this two issues in #592

@autoantwort autoantwort deleted the https-binary-cache branch August 9, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants