Skip to content

Commit

Permalink
Merge pull request #91 from zergin/fixContentLengthDiscovery
Browse files Browse the repository at this point in the history
Allow HTTP_CONTENT_LENGTH header
  • Loading branch information
peej committed Jul 23, 2012
2 parents 1758570 + c091c4b commit e51ef99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tonic/Request.php
Expand Up @@ -98,7 +98,7 @@ private function getContentType($options)

private function getData($options)
{
if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
if ($this->getOption($options, 'contentLength', array('CONTENT_LENGTH', 'HTTP_CONTENT_LENGTH')) > 0) {
return file_get_contents('php://input');
} elseif (isset($options['data'])) {
return $options['data'];
Expand Down

0 comments on commit e51ef99

Please sign in to comment.