Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Handle mimetype params on input Content-Type header
  • Loading branch information...
commit ef50192b6cf336ef2c4c0fc3ad122194e3d0ecde 2 parents 087e068 + 2dab2b5
@epixa epixa authored
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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.