8 Commits
Author SHA1 Message Date
Tonis Tiigi 80766cdd4b http: fix release race between cache and snapshot
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-13 19:56:53 -07:00
Tonis Tiigi b41ad2f121 http: add http support to ResolveSourceMeta
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-13 09:24:28 -07:00
Tonis Tiigi b5286f8dcb apply x/tools/modernize fixes
Autogenerated with couple of manual patches.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-07 08:18:45 -08:00
Erik Sipsma cf2698c0e4 Fix gzip decoding of HTTP sources.
The go http library will normally implicitly set an Accept-Encoding of
gzip to requests and then transparently decompress the response body.
However, if the Accept-Encoding header is explicitly set by the caller
it will no longer transparently decompress the body. This was causing
HTTP LLB sources to have unexpectedly compressed contents.

The fix here just unsets the Accept-Encoding header after the HEAD
request. Another possible fix would be to do our own gzip decompression
after reading the body if it was gzipped, but this approach seemed
slightly simpler.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2023-04-10 18:09:45 -07:00
Tonis Tiigi f2f3d8cf94 http: ensure HEAD and GET requests have same headers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-03-27 15:57:46 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi e0af9d1218 source: add more properties to http source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-04 12:00:46 -08:00
Tonis Tiigi c9f45dbc22 add unit tests for http source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-02 19:52:15 -08:00