Hello,
I’m trying to emulate a multipart form parameter and file upload using Gatling 2.1.7. The following Curl outline method works:
curl -v --form param1=value1 --form param2=value2 –-form filename=@C:\temp\file.dat http:///upload.asp
However, when I try in Gatling using outline as
…
val upload = exec(http(“Upload”)
.post("/upload.asp")
.bodyPart(StringBodyPart(“param1”, “value1”))
.bodyPart(StringBodyPart(“param2”, “value2”))
.bodyPart(RawFileBodyPart(“filename”,“C:\temp\file.dat”).fileName(“file.dat”)))
The backend server system appears to extract the parameters with what looks to be prefixed with ‘Content-Transfer-Encoding:+8bit’ (IIS log)
What I have noticed in WireShark is Gatling transmits
Content-Disposition: form-data; name=“param1”
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
value1
–wfIz3xxkgO_BxBsqUuPNzWE_KcLKlgB
whereas Curl only transmits:
Content-Disposition: form-data; name=“param1”
value1
------------------------dc3316d98f823280
I unfortunately cannot modify the server end.
Is there an obvious thing I’m doing wrong; is a more custom approach needed; can Content-Type and Content-Transfer-Encoding be inhibited?
Help and guidance appreciated.
Thank You