We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
🐞 Describe the bug
I am used aiohttp as a client and a server to File Uploads,The server raised an error when I add headers in post request。
aiohttp
Could not find starting boundary b'--dd7db5e4c3bd4d5187bb978aef4d85b1'
💡 To Reproduce
python: 3.7.4 aiohttp: 3.7.4.post0 windows10
... print("Enter form-data") print("req header: ", request.headers) data = await request.post() file_data = data["file"]
async with aiohttp.ClientSession() as session: async with session.post( url='http://{}:{}/mesh/recognize'.format(web_ip, web_port), data=file_data, headers={'Content-Type': 'multipart/form-data; boundary=dd7db5e4c3bd4d5187bb978aef4d85b1'} ) as resp:
console:
Enter form-data req header: <CIMultiDictProxy('Host': '192.168.102.116:8000', 'Content-Type': 'multipart/form-data; boundary=dd7db5e4c3bd4d5187bb978aef4d85b1', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.7 aiohttp/3.7.4.post0', 'Content-Length': '364927')> Could not find starting boundary b'--dd7db5e4c3bd4d5187bb978aef4d85b1' ---** predict is Failed **---
async with aiohttp.ClientSession() as session: async with session.post( url='http://{}:{}/mesh/recognize'.format(web_ip, web_port), data=file_data) as resp:
Enter form-data req header: <CIMultiDictProxy('Host': '192.168.102.116:8000', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.7 aiohttp/3.7.4.post0', 'Content-Length': '364927', 'Content-Type': 'multipart/form-data; boundary=dd7db5e4c3bd4d5187bb978aef4d85b1')> out: torch.float32 Predict result :tensor([[[0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [5.0122, 4.7581, 4.8532, ..., 4.7490, 4.6256, 4.8851]]]), run time is 3054.393768310547ms ---** predict is Successed! **---
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🐞 Describe the bug
I am used
aiohttp
as a client and a server to File Uploads,The server raised an error when I add headers in post request。Could not find starting boundary b'--dd7db5e4c3bd4d5187bb978aef4d85b1'
💡 To Reproduce
environment
server
client
1、Not work
console:
2、 work
console:
The text was updated successfully, but these errors were encountered: