Am 17.08.2017 um 10:55 schrieb Arif Waram:
Hi,
I have some issue with JMeter 3.2 r 1790748. When I create an HTTP Request to
POST image file to the server with these options.
[/] Use multipath/form-data for POST
[/] Browser-compatible headers.
[/] Client implementation: HttpClient4 (Java and none are also give the same
result).
Server side use Hapi.js to handle HTTP Request.
But It occurs "400 (Bad request): Invalid content-type header: multipart missing
boundary" message.
but when I try with JMeter 2.13 r 1665067 with all same settings, everything works fine
with "200 OK" message.
I guess that it because in JMeter 3.2 it always adds "charset = US-ASCII" after boundary value in
Content-Type field (but JMeter 2.13 didn't). In my case, media type is an "image", not a
"text" subtype. so I'm not sure that is it necessary to specify charset according to RFC2616.
You might want to look at (add your case to)
https://bz.apache.org/bugzilla/show_bug.cgi?id=61384
Or the other bug entries that Philippe has mentioned there.
Is hapi.js running standalone or behind an iis?
It would be awesome, if you can try out the attached patch.
Regards,
Felix
Here are HTTP Requests from both version.
http://www.ietf.org/rfc/rfc2046.txt
1.) JMeter 3.2 r 1790748
POST http://mydomain.com:8085/addImage
POST data:
--KwRk__3noM4jyn3FWmoKp1FJiXeDniWoY2QF22
Content-Disposition: form-data; name="image"; filename="trump.jpg"
Content-Type: image/jpeg
<actual file content, not shown here>
--KwRk__3noM4jyn3FWmoKp1FJiXeDniWoY2QF22--
[no cookies]
Request Headers:
Connection: keep-alive
Content-Length: 21689
Content-Type: multipart/form-data;
boundary=KwRk__3noM4jyn3FWmoKp1FJiXeDniWoY2QF22; charset=US-ASCII
Host: mydomain.com:8085
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_121)
2.) JMeter 2.13 r 1665067
POST http://mydomain.com:8085/addImage
POST data:
--R6N4_OKH-BGdZFZoPrkOlw9ntsrstTe
Content-Disposition: form-data; name="image"; filename="trump.jpg"
Content-Type: image/jpeg
<actual file content, not shown here>
--R6N4_OKH-BGdZFZoPrkOlw9ntsrstTe--
[no cookies]
Request Headers:
Connection: keep-alive
Content-Length: 21675
Content-Type: multipart/form-data; boundary=R6N4_OKH-BGdZFZoPrkOlw9ntsrstTe
Host: mydomain.com:8085
User-Agent: Apache-HttpClient/4.2.6 (java 1.5)
Best regards.
Arif
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]