1

I see someone modified the net/http module to send chunked request.

That was 4 years ago. Can't that be done directly by the official net/http module without modification?

0

1 Answer 1

1

The net/http package automatically uses chunked encoding for request bodies when the content length is not known and the application did not explicitly set the transfer encoding to "identity". This feature dates back to the Go 1 release.

Sign up to request clarification or add additional context in comments.

3 Comments

I see where the problem is: the Go's http client caches small chunks and do not send them out. go-review.googlesource.com/c/go/+/10021
@Mr.WangfromNextDoor, can you elaborate on your comment? The change introduced by the CL you've linked to was included into Go 1.5, and now we have Go 1.9. So what "the problem" you're referring to really is?
Thanks @kostix, I see the reason why that branch(github.com/benburkert/http) is created. github.com/benburkert/http/commit/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.