Kohana v3.3.5
This commit is contained in:
@@ -34,7 +34,10 @@ class Kohana_Request_Client_Curl extends Request_Client_External {
|
||||
// if using a request other than POST. PUT does support this method
|
||||
// and DOES NOT require writing data to disk before putting it, if
|
||||
// reading the PHP docs you may have got that impression. SdF
|
||||
$options[CURLOPT_POSTFIELDS] = $request->body();
|
||||
// This will also add a Content-Type: application/x-www-form-urlencoded header unless you override it
|
||||
if ($body = $request->body()) {
|
||||
$options[CURLOPT_POSTFIELDS] = $body;
|
||||
}
|
||||
|
||||
// Process headers
|
||||
if ($headers = $request->headers())
|
||||
|
@@ -127,6 +127,8 @@ abstract class Kohana_Request_Client_External extends Request_Client {
|
||||
->headers('content-type', 'application/x-www-form-urlencoded; charset='.Kohana::$charset);
|
||||
}
|
||||
|
||||
$request->headers('content-length', (string) $request->content_length());
|
||||
|
||||
// If Kohana expose, set the user-agent
|
||||
if (Kohana::$expose)
|
||||
{
|
||||
|
Reference in New Issue
Block a user