Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
deansheather merged 3 commits intomainfromdean/slim-etag
Jan 17, 2023
Merged

Conversation

deansheather
Copy link
Member

  • AddsETag header to the slim binary endpoint
  • Adds support forIf-None-Match andIf-Match to the slim binary endpoint (Go'shttp.FileServer does this for us when we setETag first).
  • Adds tests forETags andIf-None-Match

Unblockscoder/vscode-coder#23

@deansheatherdeansheather requested a review froma team as acode ownerJanuary 17, 2023 17:39
@deansheatherdeansheather requested review fromBrunoQuaresma andcoadler and removed request fora team andBrunoQuaresmaJanuary 17, 2023 17:39
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice!

}

// Avoid DOS by using a pool, and only doing work once per file.
v, err, _ := b.sf.Do(name, func() (interface{}, error) {
Copy link
Member

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?

Copy link
MemberAuthor

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.

Copy link
Member

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!

@deansheatherdeansheather merged commitb19d644 intomainJan 17, 2023
@deansheatherdeansheather deleted the dean/slim-etag branchJanuary 17, 2023 18:38
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 17, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@coadlercoadlerAwaiting requested review from coadler

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@deansheather@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp