From 16b931d2b391f3873cf8dd34dd767668b592babe Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Sat, 18 Sep 2010 20:20:28 +0200 Subject: [PATCH] Some times CONTENT_LENGTH are given as '' --- src/s2repoze/plugins/sp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s2repoze/plugins/sp.py b/src/s2repoze/plugins/sp.py index 24e7668..2d720c6 100644 --- a/src/s2repoze/plugins/sp.py +++ b/src/s2repoze/plugins/sp.py @@ -267,10 +267,10 @@ class SAML2Plugin(FormPluginBase): #### IIdentifier #### def identify(self, environ): - self.log = environ.get('repoze.who.logger','') + self.log = environ.get('repoze.who.logger', '') self.saml_client.log = self.log - if "CONTENT_LENGTH" not in environ: + if "CONTENT_LENGTH" not in environ or not environ["CONTENT_LENGTH"]: if self.debug: self.log and self.log.info('[identify] get or empty post') return {}