Subversion Repositories eFlore/Applications.del

Rev

Rev 2077 | Rev 2086 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2077 Rev 2079
Line 315... Line 315...
315
			$code = RestServeur::HTTP_CODE_ACCES_NON_AUTORISE;
315
			$code = RestServeur::HTTP_CODE_ACCES_NON_AUTORISE;
316
			throw new Exception($message, $code);
316
			throw new Exception($message, $code);
317
		}
317
		}
318
		return $etreAdmin;
318
		return $etreAdmin;
319
	}
319
	}
-
 
320
}
-
 
321
 
-
 
322
/**
-
 
323
 * Compatibilité avec nginx - merci http://php.net/manual/fr/function.getallheaders.php
-
 
324
 */
-
 
325
if (! function_exists('apache_request_headers')) {
-
 
326
	function apache_request_headers() {
-
 
327
		$headers = '';
-
 
328
		foreach ($_SERVER as $name => $value) {
-
 
329
			if (substr($name, 0, 5) == 'HTTP_') {
-
 
330
				$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
-
 
331
			}
-
 
332
		}
-
 
333
		return $headers;
-
 
334
	}
320
}
335
}
321
336