- Notifications
You must be signed in to change notification settings - Fork928
feat: add etag to slim binaries endpoint#5750
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
} | ||
// Avoid DOS by using a pool, and only doing work once per file. | ||
v, err, _ := b.sf.Do(name, func() (interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Did I understand the logic correctly that the purpose of this is to be able to compute hashes of served binaries that were not incoder.sha1
, e.g. when it's missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yep, basically. This also serves the case where we're serving directly from the site FS because the binaries weren't compressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ok, perfect. Thanks for confirming!
Uh oh!
There was an error while loading.Please reload this page.
ETag
header to the slim binary endpointIf-None-Match
andIf-Match
to the slim binary endpoint (Go'shttp.FileServer
does this for us when we setETag
first).ETags
andIf-None-Match
Unblockscoder/vscode-coder#23