我正在尝试在 GAE python 开发环境中提供 mp4/video(使用 dev_appserver.py),但到目前为止我无法在我的浏览器上播放它。
由于开发服务器上发生了“Broken Pipe”错误,我能够在生产环境(在谷歌服务器上)播放它,问题可能是由浏览器的并行请求引起的。(如果我的理解是正确的,dev_appserver.py 是单线程的,无法处理并行请求。)
我尝试了 Chrome 的“--disable-preconnect”选项,但没有解决问题。
有什么解决方法吗?非常感谢您的建议。
编辑:电影文件存储为静态资源,我尝试直接访问它(没有使用视频标签)。
[版本信息]
- 操作系统:Ubuntu 12.04 LTE
- 浏览器:Chrome 19.0.1084.46、Firefox 12.0
- GAE:Python - 1.6.5,
- 蟒蛇:2.7.3
[错误日志]
INFO 2012-05-21 07:35:04,575 dev_appserver.py:2891] "GET /static/test.mp4 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36240)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/home/chikashi/Development/google_appengine/google/appengine/tools/dev_appserver.py", line 2579, in __init__
BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
self.wfile.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------