From 5a67c5040064b866d6bb1d3e4a4d09944b3990ac Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Tue, 24 May 2011 08:03:47 +0000 Subject: [PATCH] SAML2_Binding: Log more information when unable to determine the current binding. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2844 44740490-163a-0410-bde0-09ae8108e29a --- lib/SAML2/Binding.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/SAML2/Binding.php b/lib/SAML2/Binding.php index 3cb987f05..b4016b3cb 100644 --- a/lib/SAML2/Binding.php +++ b/lib/SAML2/Binding.php @@ -78,6 +78,18 @@ abstract class SAML2_Binding { break; } + SimpleSAML_Logger::warning('Unable to find the SAML 2 binding used for this request.'); + SimpleSAML_Logger::warning('Request method: ' . var_export($_SERVER['REQUEST_METHOD'], TRUE)); + if (!empty($_GET)) { + SimpleSAML_Logger::warning("GET parameters: '" . implode("', '", array_map('addslashes', array_keys($_GET))) . "'"); + } + if (!empty($_POST)) { + SimpleSAML_Logger::warning("POST parameters: '" . implode("', '", array_map('addslashes', array_keys($_POST))) . "'"); + } + if (isset($_SERVER['CONTENT_TYPE'])) { + SimpleSAML_Logger::warning('Content-Type: ' . var_export($_SERVER['CONTENT_TYPE'], TRUE)); + } + throw new Exception('Unable to find the current binding.'); } -- GitLab