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

static: handle If-None-Match for ETag. #200

Merged
merged 1 commit into from
May 4, 2020
Merged

static: handle If-None-Match for ETag. #200

merged 1 commit into from
May 4, 2020

Conversation

humaidq
Copy link
Contributor

@humaidq humaidq commented May 3, 2020

We handle the If-None-Match header, and if it matches the current ETag then don't resend the resource and return a 304 Not Modified. The header value is also surrounded with ".

This resolves #152.

Thank you.

@codecov
Copy link

codecov bot commented May 3, 2020

Codecov Report

Merging #200 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   91.77%   91.79%   +0.01%     
==========================================
  Files          11       11              
  Lines        1557     1560       +3     
==========================================
+ Hits         1429     1432       +3     
  Misses         96       96              
  Partials       32       32              
Impacted Files Coverage Δ
static.go 90.24% <100.00%> (+0.24%) ⬆️

Copy link
Contributor

@unknwon unknwon left a comment

Choose a reason for hiding this comment

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

Thank you!

@unknwon unknwon merged commit 827b70e into go-macaron:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Read If-None-Match header if ETag is enabled in Static Handler
2 participants