Skip to content
Browse files

Merge pull request #215 from dshafik/handle-content-type-charset

Handle mimetype params on input Content-Type header
  • Loading branch information...
2 parents 087e068 + 2dab2b5 commit ef50192b6cf336ef2c4c0fc3ad122194e3d0ecde @epixa epixa committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/frapi/library/Frapi/Controller/Main.php
View
5 src/frapi/library/Frapi/Controller/Main.php
@@ -526,6 +526,11 @@ public function setInputFormat()
$contentType = $matches[1];
}
+ if (strpos($contentType, ';') !== false) {
+ $parts = explode(';', $contentType);
+ $contentType = $parts[0];
+ }
+
if(!empty($contentType) &&
isset($this->mimeMaps[$contentType]) &&
in_array($this->mimeMaps[$contentType], $this->allowedInputTypes)) {

0 comments on commit ef50192

Please sign in to comment.
Something went wrong with that request. Please try again.