From f2692a294dd565ad16f9dde781622f6685767849 Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Mon, 7 Jul 2014 15:07:15 -0400 Subject: [PATCH 1/2] Fix response.status --- src/python/WMCore/REST/Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/WMCore/REST/Main.py b/src/python/WMCore/REST/Main.py index ffde1ca394..df1c1cb668 100644 --- a/src/python/WMCore/REST/Main.py +++ b/src/python/WMCore/REST/Main.py @@ -94,7 +94,7 @@ def access(self): 'H': self.host, 'h': remote.name or remote.ip, 'r': request.request_line, - 's': response.status.split(" ", 1)[0], + 's': response.status, # request.rfile.rfile.bytes_read is a custom CMS web # cherrypy patch not always available, hence the test 'i': (getattr(request.rfile, 'rfile', None) From 9b30b687be4ba8c6eef82213a27294829c620883 Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Mon, 7 Jul 2014 15:07:54 -0400 Subject: [PATCH 2/2] Adjust ReqMgrServer to new framework requirements --- src/python/WMCore/ReqMgr/Web/ReqMgrService.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/python/WMCore/ReqMgr/Web/ReqMgrService.py b/src/python/WMCore/ReqMgr/Web/ReqMgrService.py index 6352dfb8a9..75d2847310 100644 --- a/src/python/WMCore/ReqMgr/Web/ReqMgrService.py +++ b/src/python/WMCore/ReqMgr/Web/ReqMgrService.py @@ -199,7 +199,7 @@ class ReqMgrService(TemplatedPage): """ Request Manager web service class """ - def __init__(self, config=None): + def __init__(self, app, config, mount): print "\n### Configuration:" print config self.base = config.base @@ -234,14 +234,6 @@ def __init__(self, config=None): }) self._cache = {} - # TODO: - # for time being use development environment - # this part will be removed in production when we enable - # proper authentication - cherrypy.server.environment = 'development' - cherrypy.server.socket_host = '127.0.0.1' - authz_fake() - # initialize rest API statedir = '/tmp' app = RESTMain(config, statedir) # REST application