From f6d616d9fb70267d57047f345e7cccf811fd610c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 May 2023 20:26:06 +0800 Subject: [PATCH 1/4] bugfix --- ahserver/configuredServer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ahserver/configuredServer.py b/ahserver/configuredServer.py index 85f5655..1039478 100755 --- a/ahserver/configuredServer.py +++ b/ahserver/configuredServer.py @@ -30,6 +30,9 @@ class ConfiguredServer(AppLogger): initEnv() setupTemplateEngine() client_max_size = 1024 * 10240 + if config.website.client_max_size: + client_max_size = config.website.client_max_size + self.app = web.Application(client_max_size=client_max_size) auth = auth_klass() auth.setupAuth(self.app) From 145d9efb85c3adea8c9a769db0be8ff74cdce68d Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 May 2023 20:35:23 +0800 Subject: [PATCH 2/4] bugfix --- ahserver/configuredServer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ahserver/configuredServer.py b/ahserver/configuredServer.py index 1039478..a2f652e 100755 --- a/ahserver/configuredServer.py +++ b/ahserver/configuredServer.py @@ -32,7 +32,8 @@ class ConfiguredServer(AppLogger): client_max_size = 1024 * 10240 if config.website.client_max_size: client_max_size = config.website.client_max_size - + + print(f'{client_max_size=}') self.app = web.Application(client_max_size=client_max_size) auth = auth_klass() auth.setupAuth(self.app) From 5b61e749f4407765d4ceaa0ab268d069ee63fcf4 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 May 2023 22:31:52 +0800 Subject: [PATCH 3/4] bugfix --- ahserver/filestorage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ahserver/filestorage.py b/ahserver/filestorage.py index 337a99e..5a372b1 100755 --- a/ahserver/filestorage.py +++ b/ahserver/filestorage.py @@ -110,6 +110,6 @@ class FileStorage: siz += len(d); await f.write(d) await f.flush() - # print(f'{name=} file({fpath}) write {siz} bytes') + print(f'{name=} file({fpath}) write {siz} bytes') self.tfr.newtmpfile(fpath) return fpath From 7ccc1de1346ede1049cd22b9fa94e6d488f03868 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 May 2023 22:58:31 +0800 Subject: [PATCH 4/4] bugfix --- ahserver/filestorage.py | 6 +++--- ahserver/processorResource.py | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ahserver/filestorage.py b/ahserver/filestorage.py index 5a372b1..92e8494 100755 --- a/ahserver/filestorage.py +++ b/ahserver/filestorage.py @@ -22,7 +22,7 @@ class TmpFileRecord: self.filename = self.savefilename() self.loop = asyncio.get_event_loop() self.loop.call_later(0.01, self.load) - print('TmpFileRecord() .........................') + # print('TmpFileRecord() .........................') def newtmpfile(self, path:str): self.filetime[path] = time.time() @@ -44,7 +44,7 @@ class TmpFileRecord: self.change_flg = False async def load(self): - print('load() called ............') + # print('load() called ............') fn = self.filename if not os.path.isfile(fn): return @@ -110,6 +110,6 @@ class FileStorage: siz += len(d); await f.write(d) await f.flush() - print(f'{name=} file({fpath}) write {siz} bytes') + # print(f'{name=} file({fpath}) write {siz} bytes') self.tfr.newtmpfile(fpath) return fpath diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index 84a97a4..cac8873 100755 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -102,7 +102,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): def abspath(self, request, path:str): url = self.entireUrl(request, path) fname = self.url2file(url) - print(f'abspath():, {path=}, {url=}, {fname=}') return fname async def getPostData(self,request: Request) -> dict: @@ -227,7 +226,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): self.user = await auth.get_auth(request) self.y_env.user = self.user self.request_filename = self.url2file(str(request.path)) - print(f'225:{request.path=}, {self.request_filename=}') path = request.path config = getConfig() if config.website.dbadm and path.startswith(config.website.dbadm): @@ -312,13 +310,11 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): return False def url2processor(self, request, url, fpath): - print('fpath=', fpath) config = getConfig() url = self.entireUrl(request, url) host = '/'.join(str(request.url).split('/')[:3]) path = request.path real_path = self.abspath(request, path) - print(f'url2processor():{path=}, {real_path=}') if config.website.startswiths: for a in config.website.startswiths: if path.startswith(a.leading): @@ -351,7 +347,6 @@ class ProcessorResource(AppLogger, StaticResource,Url2File): async def path_call(self, request, path, params={}): url = self.entireUrl(request, path) fpath = self.url2file(url) - print(f'path_call():{path=}, {url=}, {fpath=}') processor = self.url2processor(request, url, fpath) return await processor.path_call(request, params=params)