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

feat(http1): support flush chunk in handler #610

Merged

Conversation

welkeyever
Copy link
Member

@welkeyever welkeyever commented Feb 13, 2023

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.

支持在handler中按chunk flush数据

(Optional) More detail description for this PR(en: English/zh: Chinese).

en:

  1. Support hijack for writer of response
  2. Provide a impl for chunk-flushing writer for http/1.1

zh(optional):

  1. response 支持writer劫持
  2. 提供一个支持按chunk块flush的writer实现

Which issue(s) this PR fixes:

None

@welkeyever welkeyever requested review from a team as code owners February 13, 2023 12:09
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 72.12% // Head: 72.06% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (2a4f79d) compared to base (e4cc656).
Patch coverage: 55.88% of modified lines in pull request are covered.

❗ Current head 2a4f79d differs from pull request most recent head b958f70. Consider uploading reports for the commit b958f70 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #610      +/-   ##
===========================================
- Coverage    72.12%   72.06%   -0.07%     
===========================================
  Files           94       96       +2     
  Lines         9234     9385     +151     
===========================================
+ Hits          6660     6763     +103     
- Misses        2155     2189      +34     
- Partials       419      433      +14     
Impacted Files Coverage Δ
pkg/app/fs.go 68.65% <ø> (ø)
pkg/common/test/mock/network.go 0.00% <0.00%> (ø)
pkg/common/test/mock/writer.go 0.00% <0.00%> (ø)
pkg/network/writer.go 95.65% <ø> (ø)
pkg/protocol/http1/ext/stream.go 14.37% <42.30%> (+14.37%) ⬆️
pkg/protocol/http1/ext/common.go 25.16% <47.72%> (+4.03%) ⬆️
pkg/app/context.go 85.24% <71.87%> (+0.94%) ⬆️
pkg/protocol/http1/resp/writer.go 72.72% <72.72%> (ø)
pkg/protocol/response.go 85.29% <95.65%> (+1.18%) ⬆️
pkg/protocol/http1/server.go 62.67% <100.00%> (+0.36%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@welkeyever welkeyever requested a review from a team February 15, 2023 06:35
li-jin-gou
li-jin-gou previously approved these changes Feb 16, 2023
@welkeyever welkeyever force-pushed the feat/support_flush_chunk_in_handler branch from 156f80c to 2bb0bf2 Compare February 16, 2023 11:51
@welkeyever welkeyever merged commit cf5e58b into cloudwego:develop Feb 20, 2023
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.

4 participants