bugfix
This commit is contained in:
parent
c06691d27c
commit
401abe9763
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
from traceback import print_exc
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ from .filestorage import FileStorage
|
|||||||
from .restful import DBCrud
|
from .restful import DBCrud
|
||||||
from .dbadmin import DBAdmin
|
from .dbadmin import DBAdmin
|
||||||
from .filedownload import file_download, path_decode
|
from .filedownload import file_download, path_decode
|
||||||
from utils import unicode_escape
|
from .utils import unicode_escape
|
||||||
|
|
||||||
def getHeaderLang(request):
|
def getHeaderLang(request):
|
||||||
al = request.headers.get('Accept-Language')
|
al = request.headers.get('Accept-Language')
|
||||||
@ -234,7 +235,7 @@ class ProcessorResource(StaticResource,Url2File):
|
|||||||
if processor:
|
if processor:
|
||||||
return await processor.handle(request)
|
return await processor.handle(request)
|
||||||
|
|
||||||
filepath = self.url2filepath(str(request.url))
|
filepath = self.url2file(str(request.url))
|
||||||
if filepath and self.isHtml(filepath):
|
if filepath and self.isHtml(filepath):
|
||||||
return await html_handle(request, filepath)
|
return await html_handle(request, filepath)
|
||||||
|
|
||||||
@ -265,7 +266,9 @@ class ProcessorResource(StaticResource,Url2File):
|
|||||||
return True
|
return True
|
||||||
if b.stratswith('<!doctype html>'):
|
if b.stratswith('<!doctype html>'):
|
||||||
return True
|
return True
|
||||||
except:
|
except Exception as e:
|
||||||
|
print_exc()
|
||||||
|
print(e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def url2processor(self, request, url):
|
def url2processor(self, request, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user