chromatic is correct. From the docs:
If POSTed data is not of type application/x-www-form-urlencoded or multipart/form-data, then the POSTed data will not be processed, but instead be returned as-is in a parameter named POSTDATA.
I'm not sure of all the curl command lines, but here's how I would test using LWP's lwp-request:
One caveat though, it cannot be 'application/xml' either. For some reasons XForms overreached and managed to grab that generic content-type and CGI does some special processing for it.lwp-request -m PUT -c 'text/xml' -se 'http://localhost/cgi-bin/api.pl +' < test.xml
update: And to properly handle PUTDATA, you need your CGI version to be greater that 3.30. That support was actually hacked our here in the monastery: REST Webservices and CGI.pm.
In reply to Re: Can't access {POST|PUT}DATA from CGI script
by derby
in thread Can't access {POST|PUT}DATA from CGI script
by vendion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |