diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index 5ef135b..4e778fe 100755 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -183,6 +183,7 @@ class PythonScriptProcessor(BaseProcessor): lenv = self.run_ns del lenv['request'] txt = self.loadScript(self.real_path) + # print(self.real_path, "#########", txt) exec(txt,lenv,lenv) func = lenv['myfunc'] return await func(request,**lenv) diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index eb5e864..4ca22c6 100755 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -308,6 +308,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): if not config.website.allowListFolder: self.error('%s:not found' % str(request.url)) raise HTTPNotFound + # print(f'{self.request_filename=}, {str(request.url)=}') return await super()._handle(request) def gethost(self, request): diff --git a/ahserver/url2file.py b/ahserver/url2file.py index c139cc6..64dbe17 100755 --- a/ahserver/url2file.py +++ b/ahserver/url2file.py @@ -30,6 +30,7 @@ class Url2File: paths = paths[3:] f = os.path.join(self.path,*paths) real_path = os.path.abspath(f) + # print(f'{real_path=}, {url=}, {f=}') return real_path def url2file(self, url: str) -> str: @@ -40,6 +41,7 @@ class Url2File: for idx in self.indexes: p = os.path.join(real_path,idx) if os.path.isfile(p): + # print(f'{url=}, {real_path=}, {idx=}, {p=}') return p if os.path.isfile(real_path): @@ -56,7 +58,9 @@ class Url2File: items = url.split('/') if len(items) > 2: del items[-2] + oldurl = url url = '/'.join(items) + # print(f'{oldurl=}, {url=}') return self.url2file(url) print(f'url2file() return None finally, {items:}, {url=}, {ourl=}, {self.path=}') return None