-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serving a static mp4 file caused exception #1595
Comments
exception is fixed in master. i am not sure about file size, try again with latest master |
now no exception reported, but mp4 file still not correctly served. response: |
I had 206 response and no content (blank line after headers) in browser. 1.3.1 |
To play Video in Chrome/Opera HTTP status Must be 200 |
Need to check RFCs
serving a static mp4 file caused exception #1595
serving a static mp4 file caused exception #1595
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\file_sender.py", line 131, in _sendfile_fallback
yield from resp.drain()
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_reqrep.py", line 888, in drain
yield from self._resp_impl.transport.drain()
File "D:\soft\prog\python3\python-3.5.1\lib\asyncio\streams.py", line 333, in drain
yield from self._protocol._drain_helper()
File "D:\soft\prog\python3\python-3.5.1\lib\asyncio\streams.py", line 211, in _drain_helper
yield from waiter
File "D:\soft\prog\python3\python-3.5.1\lib\asyncio\futures.py", line 361, in iter
yield self # This tells Task to wait for completion.
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_server.py", line 61, in handle_request
resp = yield from self._handler(request)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web.py", line 249, in _handle
resp = yield from handler(request)
File "D:\prog\comp.lang.python\vmax\webfx2.py", line 330, in response
r = await handler(request)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_urldispatcher.py", line 486, in _handle
ret = yield from self._file_sender.send(request, filepath)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\file_sender.py", line 201, in send
yield from self._sendfile(request, resp, f, count)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\file_sender.py", line 137, in _sendfile_fallback
resp.set_tcp_nodelay(True)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_reqrep.py", line 737, in set_tcp_nodelay
resp_impl.transport.set_tcp_nodelay(value)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\parsers.py", line 254, in set_tcp_nodelay
self._socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, value)
OSError: [WinError 10038] 在一个非套接字上尝试了一个操作。
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
I'm using py3.5.2, win32, aiohttp 1.3a (master)
request:
GET /static/upload/%E6%B5%99%E6%B1%9F%E8%81%94%E9%80%9Avmax/%E7%94%BB%E7%94%BB2.mp4 HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Accept: /
Referer: http://localhost:8080/static/issue.html?id=1
Accept-Language: zh-CN,zh;q=0.8
Range: bytes=0-
response:
HTTP/1.1 206 Partial Content
Content-Type: video/mp4
Last-Modified: Tue, 03 Jan 2017 02:19:38 GMT
Content-Length: 4201671
Date: Tue, 07 Feb 2017 15:26:24 GMT
Server: Python/3.5 aiohttp/1.3.0a0
the file is 4M, but the console shows only 366KB.
I'm just a plain lib user, have no idea how to fix it. only thing to do is waiting this to be fixed.
thanks all~
The text was updated successfully, but these errors were encountered: