Skip to content

Problem with uvloop and static files #1093

Closed
@gleb-chipiga

Description

Python/3.5.2 aiohttp/0.22.5 uvloop==0.5.2

Run this code:

import asyncio

import aiohttp.web
import uvloop

asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

app = aiohttp.web.Application()
app.router.add_static('/static', 'static')
aiohttp.web.run_app(app)

Run the following command:

curl http://127.0.0.1:8080/static/index.html
<html>
    <body>
        some static file
    </body>
</html>HTTP/1.1 200 OK
CONTENT-TYPE: text/html
LAST-MODIFIED: Tue, 16 Aug 2016 23:42:56 GMT
CONTENT-LENGTH: 62
DATE: Tue, 16 Aug 2016 23:43:57 GMT
SERVER: Python/3.5 aiohttp/0.22.5

Headers come after file.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions