jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walker Mellema <walkermell...@gmail.com>
Subject multipart/form-data PUT does not send file
Date Tue, 21 Jun 2016 22:15:59 GMT
I've been using JMeter for about 6 months now with some success and some
newb problems that I eventually figured out. This one has me stumped. This
is the first time I'm using this mailing list. I'm using JMeter 2.13 on a
Macbook running OSX 10.10.4

Our API has a file upload feature. I'm able to PUT the file ADJTIME (4Kb)
using curl no problems. Our API is expecting a content-type of
multipart/form-data. The API responds with the expected 204. Curl
automatically inserts a boundary

When I try to PUT the file to the same endpoint using JMeter, I get a 200.
When I examine the request header in the JMeter view results tree, I see
that the content-length is 0. This makes me think that JMeter is not
reading the file.

I know the path is correct because I browsed to it using the browse button
under the "Send file with the request" section.

JMeter doesn't seem to create a boundary so I added one in the header
manager like this:

Content-Type multipart/form-data; boundary=d76566a6ebb651d3

I then manually added the boundary to the file itself like this:

--d76566a6ebb651d3
(4kb of text goes here)
--d76566a6ebb651d3--

I've googled and stackoverflowed this issue quite a bit with no luck.
Anybody know what I'm doing wrong? Thanks.

Walker Mellema

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message