Skip to content

Commit

Permalink
Add Content-Length header to OAuth requests when a body is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Woody Gilk committed Dec 16, 2011
1 parent faa2041 commit 813a509
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/kohana/oauth/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ public function execute(array $options = NULL)
}
}

if ($this->body)
{
$options[CURLOPT_HTTPHEADER][] = 'Content-Length: '.strlen($this->body);
}

return OAuth::remote($url, $options);
}

Expand Down

0 comments on commit 813a509

Please sign in to comment.