Skip to content

Missing Content-Length header #4

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

Closed
jesustorresdev opened this issue Nov 22, 2012 · 1 comment
Closed

Missing Content-Length header #4

jesustorresdev opened this issue Nov 22, 2012 · 1 comment

Comments

@jesustorresdev
Copy link

I think the write method (at HttpClient.h#L358) should send Content-Length setted to aSide before to finish the request.

@amcewen
Copy link
Owner

amcewen commented Nov 23, 2013

It's a good idea, but sadly we don't know how many times the user is going to call write, so can't assume that aSize is the full content length.

The current implementation is a trade-off between ease of use and not having to parcel up all the the data you need to send so that it can be sent in one call to write. At present, for example, you could upload a file from an SD card, which is much bigger than the 2KB memory size of the (standard) Arduino. You wouldn't be able to do that if you had to send it all in one call as it wouldn't all fit into memory at once.

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

No branches or pull requests

2 participants