kohana/core — pull request #403 by acoulton (2013-09-26 21:27:08+00:00)
Title: Don't set empty body on external curl requests [Fixes #4791]

When the CURLOPT_POSTFIELDS option is present, curl adds a
default Content-Type header which can be changed but not
removed, causing authentication problems with signed requests.

The option should only be set if a request body is being sent.

Fixes http://dev.kohanaframework.org/issues/4791 - see issue discussion regarding tests for this issue and fix.

This is a replacement for #402 which I'd accidentally targeted to 3.3/master instead of 3.3/develop, and I've subsequently rebased back to 3.2/develop.