Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: net/http: allow NewRequest to type assert on io.Readers with a Len method #30118
In AusOcean code we have seen two bugs arising from this since we send requests with an internal
The addition of a
It seems unfortunate to hard-code use of an interface that can't describe a 2GB file on 32-bit systems.
Note that you can set req.ContentLength in the result from NewRequest if you do know the size (or prepare the request yourself entirely; NewRequest is just a slight helper).