Permalink
Browse files

Merge pull request #91 from zergin/fixContentLengthDiscovery

Allow HTTP_CONTENT_LENGTH header
  • Loading branch information...
2 parents 1758570 + c091c4b commit e51ef9978f32c8a00e4283d7086fd99ab651530a @peej committed Jul 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Tonic/Request.php
View
2 src/Tonic/Request.php
@@ -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'];

0 comments on commit e51ef99

Please sign in to comment.