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

optimize(http1): return 413 status code if request body is too large #430

Conversation

welkeyever
Copy link
Member

What type of PR is this?

optimize

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.

如果请求body体超出限制,则返回 413 状态码

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

en: server will return 413 error and with a body to describe the reason instead of 400 if request body size exceed the limit.
zh(optional): 如果请求正文大小超过限制,服务器将返回 413 错误并使用正文来描述原因而不是 400 解析错误。

Which issue(s) this PR fixes:

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 68.14% // Head: 68.07% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (02341ef) compared to base (d39a818).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ Current head 02341ef differs from pull request most recent head 297f673. Consider uploading reports for the commit 297f673 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #430      +/-   ##
===========================================
- Coverage    68.14%   68.07%   -0.07%     
===========================================
  Files           90       90              
  Lines         8632     8634       +2     
===========================================
- Hits          5882     5878       -4     
- Misses        2389     2395       +6     
  Partials       361      361              
Impacted Files Coverage Δ
pkg/protocol/http1/server.go 0.00% <0.00%> (ø)
pkg/common/timer/timer.go 61.90% <0.00%> (-19.05%) ⬇️

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 merged commit a470f4a into cloudwego:develop Dec 7, 2022
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