Browse Source

socks case insensitive on string pos (#1520)

CauseFX 5 years ago
parent
commit
7d09dab0b2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api/classes/organizr.class.php

+ 2 - 2
api/classes/organizr.class.php

@@ -277,13 +277,13 @@ class Organizr
 	{
 		switch ($request->getMethod()) {
 			case 'POST':
-				if (strpos($request->getHeaderLine('Content-Type'), 'application/json') !== false) {
+				if (stripos($request->getHeaderLine('Content-Type'), 'application/json') !== false) {
 					return json_decode(file_get_contents('php://input', 'r'), true);
 				} else {
 					return $request->getParsedBody();
 				}
 			default:
-				if ($request->getHeaderLine('Content-Type') == 'application/json') {
+				if (stripos($request->getHeaderLine('Content-Type'), 'application/json') !== false) {
 					return json_decode(file_get_contents('php://input', 'r'), true);
 				} else {
 					return null;