Thanks Andrey.
I tried adding double newline between the header and the body. It resolved
my issue of "400 Bad Request".
But then, I did not get the response I expected. My request did reach the
right server and the server did respond with a proper HTTP 200 response
code. But, the response I receive is not what I expect.
I did some investigation on this by testing my requests with the
firefox-addon "HTTPRequester". I found the cause of the problem:
1. When I send my request with the Content-Type,
"application/x-www-form-urlencoded", I get the correct response from the
server.
2. When I send my request with any other Content-Type, say "text/plain", I
get the unexpected response (with HTTP 200 code) from the server, which is
the same as that I get in JMeter.
So, I understand that the header "Content-Type", is the one that is causing
the issue.
So, I hooked up wireshark to my machine and tried to sniff the network
packets, to see if the content type that I'm setting in JMeter
("application/x-www-form-urlencoded"), is same as the one which is sent from
my machine to the server.
Surprisingly, it is the same. I could see "Content-Type:
application/x-www-form-urlencoded" in the packets sniffed.
So, I'm sending a request with the "Content-Type:
application/x-www-form-urlencoded", but the server is treating my request
as, one with "Content-Type: text/html".
This happens only when I do it with JMeter. When I try the same with
"HTTPRequestor" add-on, I get the proper response.
I do not know, where the problem is. Can you help?
Cheers,
Sasi
--
View this message in context:
http://jmeter.512774.n5.nabble.com/jp-gc-HTTP-Raw-Request-for-POST-requests-tp4635060p4638624.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]