On Dec 17, 2007 3:25 PM, Edi Weitz edi@agharta.de wrote:
On Mon, 17 Dec 2007 12:45:51 -0500, "Peter Eddy" peter.eddy@gmail.com wrote:
Should I be calculating the length myself?
Yes. See here:
http://weitz.de/drakma/#content-length
One could argue that Drakma should be able to compute the right value itself, but this is more trickier than one first thinks. Of course, if you think you know how to do this in a way that covers all corner cases, I'd be happy to accept a patch. The general design philosophy of Drakma is that it should be as easy to use as possible.
It turns out that in my case setting content-length to nil (and therefore using chunked encoding) works perfectly. I was sure I'd tried that before, but must not have. Anyway, I think that qualifies as easy.
Thanks!
- Peter