bugfix
This commit is contained in:
parent
01c7ef6c7a
commit
166e92f7ff
@ -409,23 +409,27 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
url.startswith('wss://'):
|
url.startswith('wss://'):
|
||||||
return url
|
return url
|
||||||
if url.startswith('/'):
|
if url.startswith('/'):
|
||||||
return f'{self._prepath}{url}'
|
u = f'{self._preurl}{url}'
|
||||||
|
print(f'entireUrl(), {u=}, {url=}, {self._preurl=}')
|
||||||
|
return u
|
||||||
path = request.path
|
path = request.path
|
||||||
p = self.relatedurl(path,url)
|
p = self.relatedurl(path,url)
|
||||||
return f'{self._prepath}{p}'
|
u = f'{self._preurl}{p}'
|
||||||
|
print(f'entireUrl(), {u=}, {url=}, {self._preurl=}')
|
||||||
|
return u
|
||||||
|
|
||||||
def url2path(self, url):
|
def url2path(self, url):
|
||||||
if url.startswith(self._prepath):
|
if url.startswith(self._preurl):
|
||||||
return url[len(self._prepath):]
|
return url[len(self._preurl):]
|
||||||
return url
|
return url
|
||||||
|
|
||||||
async def path_call(self, request, path, params={}):
|
async def path_call(self, request, path, params={}):
|
||||||
url = self.entireUrl(request, path)
|
url = self.entireUrl(request, path)
|
||||||
# print(f'{path=}, after entireUrl(), {url=}')
|
print(f'{path=}, after entireUrl(), {url=}')
|
||||||
path = self.url2path(url)
|
# path = self.url2path(url)
|
||||||
fpath = self.url2file(path)
|
fpath = self.url2file(path)
|
||||||
processor = self.url2processor(request, url, fpath)
|
processor = self.url2processor(request, path, fpath)
|
||||||
print(f'path_call(), {path=}, {url=}, {fpath=}, {processor=}')
|
print(f'path_call(), {path=}, {url=}, {fpath=}, {processor=}, {self._prepath}')
|
||||||
new_request = request.clone(rel_url=url)
|
new_request = request.clone(rel_url=url)
|
||||||
# new_request.path = path
|
# new_request.path = path
|
||||||
return await processor.be_call(new_request, params=params)
|
return await processor.be_call(new_request, params=params)
|
||||||
|
Loading…
Reference in New Issue
Block a user