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

handle a http.NoBody io.reader #2468

Closed
wants to merge 1 commit into from

Conversation

emilien-puget
Copy link

using a http.NoBody yields a content length of -1

as per the documentation of request.ContentLength

	// ContentLength records the length of the associated content.
	// The value -1 indicates that the length is unknown.
	// Values >= 0 indicate that the given number of bytes may
	// be read from Body.
	//
	// For client requests, a value of 0 with a non-nil Body is
	// also treated as unknown.

using a http.NoBody yields a content length of -1
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (42f07ed) 92.87% compared to head (cbc930e) 92.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2468   +/-   ##
=======================================
  Coverage   92.87%   92.87%           
=======================================
  Files          39       39           
  Lines        4616     4616           
=======================================
  Hits         4287     4287           
  Misses        239      239           
  Partials       90       90           
Impacted Files Coverage Δ
bind.go 88.88% <100.00%> (ø)

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

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

1 participant