jiazhenjiang opened a new issue, #2185:
URL: https://github.com/apache/brpc/issues/2185
**Describe the bug (描述bug)**
通过postman以multipart/formdata格式发送文件到server
,文件内容只有一行 "this is a test file"
后端通过如下方式读出文件
int fd = open("./test", O_CREAT | O_WRONLY, 0666);
ssize_t size = cntl->request_attachment().cut_into_file_descriptor(fd);
读出的内容如下:
"----------------------------451632670443248613692974
Content-Disposition: form-data; name="file"; filename="test_file2.txt"
Content-Type: text/plain
this is a test file too
``
----------------------------451632670443248613692974--"
**To Reproduce (复现方法)**
**Expected behavior (期望行为)**
只读出文件内容,而不携带http请求信息
**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:
**Additional context/screenshots (更多上下文/截图)**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]