如何将文本文件发送到显示错误 "request was rejected because no multipart boundary as found" 的 http 请求
How to send text file to a http request which shows error "request was rejected because no multipart boundary as found"
我在使用 jmeter 上传文件时遇到一些问题
我在 http header 管理器中添加了参数并上传了 .txt 文件,我正在发送一个 http 请求。
采样器请求给出 请求代码 200
响应数据如下:
Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was founderror
- 确保在 HTTP Request 采样器的 "Files Upload" 选项卡下提供正在上传的文件的完整路径
- 确保勾选
Use multipart/form-data for POST
框
确保 "Parameter Name" 匹配相关 File HTML Input field 的 "name" 属性。
在绝大多数情况下,使用 JMeter 的 HTTP(S) Test Script Recorder, just make sure you copy your file(s) to JMeter's "bin" folder prior to recording the request itself, see Recording File Uploads with JMeter 文章来记录您的文件上传事件要容易得多,以获取更多详细信息。
已解决。
- 添加Http cookie 管理器
- 在 http 请求的参数部分添加所有参数
- 添加文件 mime 类型 text/plain
感谢大家的支持。
我在使用 jmeter 上传文件时遇到一些问题
我在 http header 管理器中添加了参数并上传了 .txt 文件,我正在发送一个 http 请求。
采样器请求给出 请求代码 200
响应数据如下:
Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was founderror
- 确保在 HTTP Request 采样器的 "Files Upload" 选项卡下提供正在上传的文件的完整路径
- 确保勾选
Use multipart/form-data for POST
框 确保 "Parameter Name" 匹配相关 File HTML Input field 的 "name" 属性。
在绝大多数情况下,使用 JMeter 的 HTTP(S) Test Script Recorder, just make sure you copy your file(s) to JMeter's "bin" folder prior to recording the request itself, see Recording File Uploads with JMeter 文章来记录您的文件上传事件要容易得多,以获取更多详细信息。
已解决。
- 添加Http cookie 管理器
- 在 http 请求的参数部分添加所有参数
- 添加文件 mime 类型 text/plain
感谢大家的支持。