Hi,
We've found out that our RoR-based application can crash if broken XML
is sent as a request to the application REST API.
I've tried to create a test case that simulates sending XML - as found
on several forums and howtos - by using @request.env['RAW_POST_DATA']
but this variable seems to be ignored during the test. See the attached
file, please.
I've tested that the application behaves differently if the very same
XML is POSTed to REST API by curl. See the command below (XML sent to
server is different here):
curl -H 'Accept: application/xml' -H 'Content-type: application/xml' -u
'$user:$password' --data-binary '<xml/&' --http-request POST
https://$server:443/$path
How can I test it? What's wrong with my testcase that the RAW_POST_DATA
entry is ignored?
Thanks in advance for any help :)
Bye
Lukas
--
Lukas Ocilka, Appliances Department, Novell Inc.