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

fix: return ctx.body and set header after send #738

Merged
merged 1 commit into from
Nov 29, 2020

Conversation

czy88840616
Copy link
Member

@czy88840616 czy88840616 commented Nov 29, 2020

fix: #736 @wang-ran

  • koa 当手动设置了 body,返回为空的时候,必须显示调用 set body
  • express 提前调用 send 之后 不能设置任何头或者再次 send 了

@gitpod-io
Copy link

gitpod-io bot commented Nov 29, 2020

@codecov-io
Copy link

codecov-io commented Nov 29, 2020

Codecov Report

Merging #738 (490621e) into 2.x (c8f51f6) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x     #738      +/-   ##
==========================================
+ Coverage   86.40%   86.41%   +0.01%     
==========================================
  Files         144      144              
  Lines        5876     5882       +6     
  Branches     1083     1086       +3     
==========================================
+ Hits         5077     5083       +6     
  Misses        767      767              
  Partials       32       32              
Impacted Files Coverage Δ
packages/web-express/src/framework.ts 77.68% <100.00%> (+0.37%) ⬆️
packages/web-koa/src/framework.ts 78.22% <100.00%> (+0.72%) ⬆️

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 c8f51f6...490621e. Read the comment docs.

@czy88840616 czy88840616 merged commit 4c8e740 into 2.x Nov 29, 2020
@czy88840616 czy88840616 deleted the fix_ctx_body_and_after_send branch November 29, 2020 15:14
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.

2 participants