This commit is contained in:
yumoqing 2024-02-18 16:05:40 +08:00
parent 2f098db149
commit bb537a155a
2 changed files with 2 additions and 4 deletions

View File

@ -153,6 +153,7 @@ class TemplateProcessor(BaseProcessor):
class BricksUIProcessor(TemplateProcessor): class BricksUIProcessor(TemplateProcessor):
@classmethod @classmethod
def isMe(self,name): def isMe(self,name):
print(f'{name} is a bui")
return name=='bui' return name=='bui'
async def datahandle(self, request): async def datahandle(self, request):

View File

@ -294,18 +294,15 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
ret = await processor.handle(request) ret = await processor.handle(request)
return ret return ret
f_cnt6 = current_fileno()
if self.request_filename and await self.isHtml(self.request_filename): if self.request_filename and await self.isHtml(self.request_filename):
return await self.html_handle(request, self.request_filename) return await self.html_handle(request, self.request_filename)
f_cnt7 = current_fileno()
if self.request_filename and os.path.isdir(self.request_filename): if self.request_filename and os.path.isdir(self.request_filename):
config = getConfig() config = getConfig()
if not config.website.allowListFolder: if not config.website.allowListFolder:
self.error('%s:not found' % str(request.url)) self.error('%s:not found' % str(request.url))
raise HTTPNotFound raise HTTPNotFound
# print(f'{self.request_filename=}, {str(request.url)=}') print(f'{self.request_filename=}, {str(request.url)=} handle as a normal file')
f_cnt8 = current_fileno()
return await super()._handle(request) return await super()._handle(request)
def gethost(self, request): def gethost(self, request):