You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "jiazhenjiang (via GitHub)" <gi...@apache.org> on 2023/03/28 09:59:30 UTC
[I] 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取 (brpc)
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: dev-unsubscribe@brpc.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取 (brpc)
Posted by "wuwenjunwwj (via GitHub)" <gi...@apache.org>.
wuwenjunwwj commented on issue #2185:
URL: https://github.com/apache/brpc/issues/2185#issuecomment-2428116376
> 已经有解决方案了
请问这个如何解决的,看brpc 没有解析form-data,需要自己解析吗?
--
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: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取 (brpc)
Posted by "jiazhenjiang (via GitHub)" <gi...@apache.org>.
jiazhenjiang commented on issue #2185:
URL: https://github.com/apache/brpc/issues/2185#issuecomment-1489599370
已经有解决方案了
--
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: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取 (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2185:
URL: https://github.com/apache/brpc/issues/2185#issuecomment-2435116257
> > 已经有解决方案了
>
> 请问这个如何解决的,看brpc 没有解析form-data,需要自己解析吗?
@wuwenjunwwj 需要
--
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: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取 (brpc)
Posted by "jiazhenjiang (via GitHub)" <gi...@apache.org>.
jiazhenjiang closed issue #2185: 使用brpc实现h2server时,通过postman以multipart/formdata格式发送文件到server端,server端无法正常读取
URL: https://github.com/apache/brpc/issues/2185
--
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: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org