Please sign in to comment.
Do not read IO till EOF when the size is given
HTTPClient checks if the given IO responds to :size and set "Content-Length" header if the size is given. But it read too much till EOF. Should read just as the specified size. To make the logic simple, now HTTPClient doesn't try to calculate the whole size of request body for Content-Length if the request body is a multipart and contains an IO as a parameter. Fixes #117.
- Loading branch information...
Showing with 21 additions and 12 deletions.