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

Correctly abort middleware execution #18

Merged
merged 5 commits into from
Jan 11, 2021
Merged

Correctly abort middleware execution #18

merged 5 commits into from
Jan 11, 2021

Conversation

9seconds
Copy link
Owner

There is a use case: you start to process a request but some middleware decides to abort an execution (for example, if you have some caching whatsoever). In that case middlewares can do nothing with response headers.

@9seconds 9seconds self-assigned this Jan 11, 2021
@codecov-io
Copy link

codecov-io commented Jan 11, 2021

Codecov Report

Merging #18 (2456d76) into master (2b77eb0) will decrease coverage by 0.18%.
The diff coverage is 56.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   82.58%   82.39%   -0.19%     
==========================================
  Files          48       48              
  Lines        1424     1426       +2     
==========================================
- Hits         1176     1175       -1     
- Misses        189      192       +3     
  Partials       59       59              
Impacted Files Coverage Δ
default_layers.go 25.00% <0.00%> (-2.28%) ⬇️
server.go 74.56% <0.00%> (-2.82%) ⬇️
headers/headers.go 81.11% <71.42%> (+0.98%) ⬆️
layers/ctx.go 91.75% <100.00%> (+0.54%) ⬆️
dialers/base.go 65.45% <0.00%> (-5.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b77eb0...2456d76. Read the comment docs.

@9seconds 9seconds merged commit 1ef1394 into master Jan 11, 2021
@9seconds 9seconds deleted the layers-init branch January 11, 2021 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants