From e38de4c412e2f199407b2a1c506cbbd0aa108660 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 3 Jan 2022 11:53:39 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 3 ++- ahserver/processorResource.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index 6fd5958..5674c20 100644 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -65,7 +65,8 @@ class BaseProcessor: kw = await self.run_ns['request2ns']() self.run_ns['params_kw'] = kw self.run_ns.update(kw) - self.run_ns['ref_real_path'] = self.path + self.run_ns['ref_real_path'] = self.real_path + self.run_ns['processor'] = self async def execute(self,request): await self.set_run_env(request) diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index db963bd..8d34301 100644 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -193,6 +193,7 @@ class ProcessorResource(StaticResource,Url2File): self.y_env.gethost = gethost self.y_env.path_call = partial(self.path_call,request) self.user = await auth.get_auth(request) + self.y_env.user = self.user self.request_filename = self.url2file(str(request.url)) path = request.path config = getConfig()