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: support trailer #474

Merged
merged 32 commits into from
Feb 8, 2023
Merged

Conversation

byene0923
Copy link
Contributor

@byene0923 byene0923 commented Dec 10, 2022

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.

增加 HTTP Trailer 支持

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

en:

  • add Trailer struct to RequestHeader and ResponseHeader
  • implement trailer read and write for http1.1

zh(optional):

  • RequestHeaderResponseHeader 增加 Trailer 结构
  • 为 http1.1 实现 trailer 的读和写

Which issue(s) this PR fixes:

#201

@CLAassistant
Copy link

CLAassistant commented Dec 10, 2022

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Dec 10, 2022

Codecov Report

Base: 71.43% // Head: 72.12% // Increases project coverage by +0.69% 🎉

Coverage data is based on head (04a431c) compared to base (773cd67).
Patch coverage: 76.58% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #474      +/-   ##
===========================================
+ Coverage    71.43%   72.12%   +0.69%     
===========================================
  Files           93       94       +1     
  Lines         9000     9234     +234     
===========================================
+ Hits          6429     6660     +231     
+ Misses        2181     2155      -26     
- Partials       390      419      +29     
Impacted Files Coverage Δ
pkg/protocol/http1/ext/stream.go 0.00% <0.00%> (ø)
pkg/protocol/http1/req/header.go 65.44% <40.00%> (-0.98%) ⬇️
pkg/protocol/request.go 83.85% <50.00%> (-0.44%) ⬇️
pkg/protocol/http1/ext/common.go 21.13% <54.38%> (+11.65%) ⬆️
pkg/protocol/http1/resp/response.go 70.67% <76.92%> (+0.51%) ⬆️
pkg/protocol/header.go 77.05% <78.12%> (+0.49%) ⬆️
pkg/protocol/http1/req/request.go 62.20% <81.81%> (+0.31%) ⬆️
pkg/protocol/trailer.go 89.38% <89.38%> (ø)
pkg/protocol/args.go 82.62% <100.00%> (+0.76%) ⬆️
pkg/protocol/http1/resp/header.go 79.36% <100.00%> (+0.50%) ⬆️
... and 4 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.

@li-jin-gou li-jin-gou changed the title Trailer support(wip) [WIP]feat: support trailer Dec 11, 2022
pkg/common/utils/chunk.go Outdated Show resolved Hide resolved
pkg/protocol/header.go Outdated Show resolved Hide resolved
@wzekin wzekin requested review from a team as code owners January 3, 2023 06:33
@wzekin wzekin force-pushed the feat/http_trailer branch 2 times, most recently from d8c5805 to 8e71542 Compare January 4, 2023 10:08
pkg/protocol/header.go Outdated Show resolved Hide resolved
@wzekin wzekin force-pushed the feat/http_trailer branch 2 times, most recently from a428af2 to 1f6dc03 Compare January 10, 2023 06:44
@wzekin wzekin changed the title [WIP]feat: support trailer feat: support trailer Jan 10, 2023
@welkeyever
Copy link
Member

reviewer + @byene0923 🙏

examples/trailer/main.go Outdated Show resolved Hide resolved
pkg/common/utils/chunk.go Outdated Show resolved Hide resolved
pkg/protocol/header.go Outdated Show resolved Hide resolved
examples/trailer/main.go Outdated Show resolved Hide resolved
pkg/protocol/trailer.go Outdated Show resolved Hide resolved
pkg/protocol/trailer.go Outdated Show resolved Hide resolved
pkg/protocol/trailer.go Outdated Show resolved Hide resolved
@wzekin wzekin force-pushed the feat/http_trailer branch from effd5d8 to 04a431c Compare February 8, 2023 02:25
@welkeyever welkeyever enabled auto-merge (squash) February 8, 2023 03:40
@welkeyever welkeyever merged commit 28c304e into cloudwego:develop Feb 8, 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.

7 participants