cockroachdb / cockroachdb/cockroach-go

Error parsing headers when downloading binary

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
169
Forks
78
PR merge metrics
No merged PRs in 30d

Description

I'm getting an error downloading the binary when trying to start up a test server

```
_, err := testserver.NewTestServer()

if err != nil {
panic(err)
}
```

```
GET https://edge-binaries.cockroachdb.com/cockroach/cockroach.darwin-amd64.LATEST
Failed to fetch latest binary: error parsing Content-Disposition headers map[Accept-Ranges:[bytes] Age:[0] Alt-Svc:[h3=":443"; ma=2592000,h3-29=":443"; ma=2592000] Cache-Control:[no-cache,public,max-age=3600] Content-Length:[185562128] Content-Type:[application/octet-stream] Date:[Wed, 28 Dec 2022 20:23:01 GMT] Etag:["d2e43af9be2469a905d71c777b6b7727"] Last-Modified:[Wed, 28 Dec 2022 19:00:16 GMT] Server:[UploadServer] X-Goog-Generation:[1672254016424452] X-Goog-Hash:[crc32c=mC0r2g== md5=0uQ6+b4kaakF1xx3e2t3Jw==] X-Goog-Metageneration:[2] X-Goog-Storage-Class:[STANDARD] X-Goog-Stored-Content-Encoding:[identity] X-Goog-Stored-Content-Length:[185562128] X-Guploader-Uploadid:[ADPycdthy1breMpK_xtwPITgJN4EZMo0Hks_2Mfstr71vWpBFY2efhDwmzSJEci5ak8DfePemBLOI9J2Nb7rvUw9-x9c0Q]]: mime: no media type, attempting to use cockroach binary from your PATH
```

Looking at the code, it seems like it's trying parse a filename from the content-disposition header. But looking at the headers for that URL, it seems like there's no content-disposition header? I'm not sure if something changed on the cockroach db server side? Or maybe there's something that I'm doing wrong here

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.