From 28f811e7dd34e0084a3199f3aa32273d1845f669 Mon Sep 17 00:00:00 2001 From: Ziad Sawalha Date: Tue, 19 Apr 2011 18:50:22 -0500 Subject: Sync --- echo/echo/echo.ini | 11 ++++++----- echo/echo/echo.py | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'echo') diff --git a/echo/echo/echo.ini b/echo/echo/echo.ini index 0d38c6e7..6dfc495a 100644 --- a/echo/echo/echo.ini +++ b/echo/echo/echo.ini @@ -2,17 +2,18 @@ [app:echo] use = egg:echo -#use = egg:Paste#urlmap #/ = echo [pipeline:main] -pipeline = papiauth echo +pipeline = + papiauth + echo [filter:papiauth] use = egg:keystone#papiauth -ip = 127.0.0.1 -port = 1234 -pass = dTpw +auth_ip = 127.0.0.1 +auth_port = 8080 +auth_pass = dTpw [server:main] use = egg:Paste#http diff --git a/echo/echo/echo.py b/echo/echo/echo.py index efe24445..8a5340b8 100644 --- a/echo/echo/echo.py +++ b/echo/echo/echo.py @@ -34,6 +34,11 @@ class EchoApp: self.transform = etree.XSLT(etree.parse("xsl/echo.xsl")) def __iter__(self): + if 'HTTP_X_AUTHORIZATION' not in self.envr: + proxy_location = 'http://' + ' ' + ':' + \ + str(' ') + '/' + return HTTPUseProxy(location=proxy_location)(env, start_response) + accept = self.envr.get("HTTP_ACCEPT","application/json") if accept == "application/xml": return self.toXML() -- cgit