fix wrong path
This commit is contained in:
parent
ee97319a59
commit
add9230a5f
1 changed files with 4 additions and 2 deletions
|
|
@ -123,16 +123,18 @@ class SassAsyncMiddleware(_MiddlewareFactory):
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
file_path = os.path.join(package_dir, result)
|
||||||
|
|
||||||
await send({
|
await send({
|
||||||
'type': 'http.response.start',
|
'type': 'http.response.start',
|
||||||
'status': 200,
|
'status': 200,
|
||||||
'headers': [
|
'headers': [
|
||||||
(b'Content-Type', b'text/css; charset=utf-8'),
|
(b'Content-Type', b'text/css; charset=utf-8'),
|
||||||
(b'Content-Length', want_bytes(f'{os.path.getsize(path)}'))
|
(b'Content-Length', want_bytes(f'{os.path.getsize(file_path)}'))
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
async for chunk in _read_file(os.path.join(package_dir, result)):
|
async for chunk in _read_file(file_path):
|
||||||
await send({
|
await send({
|
||||||
'type': 'http.response.body',
|
'type': 'http.response.body',
|
||||||
'body': chunk
|
'body': chunk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue