Python3 Asyncio HTTP Server:StreamReader获取上传的文件

时间:2016-02-08 13:04:20

标签: python-3.x python-asyncio

如何使用asyncio.start_server将文件上传到服务器? 我通过此命令使用CURL发送了一个文件:

curl -i -X POST -H "Content-Type: multipart/form-data" -F "data=@server.py" http://localhost:8888

StremReader的结果是:

POST / HTTP/1.1\r\nUser-Agent: curl/7.35.0\r\nHost: localhost:8888\r\nAccept: */*\r\nContent-Length: 7673\r\nExpect: 100-continue\r\nContent-Type: multipart/form-data; boundary=------------------------ea4b0f3e04ac89ad\r\n\r\n

我的源代码:https://github.com/carlosmaniero/asyncio_server/blob/master/server.py

0 个答案:

没有答案