in reply to Can't access {POST|PUT}DATA from CGI script
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
-derby
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can't access {POST|PUT}DATA from CGI script
by vendion (Scribe) on Aug 16, 2011 at 12:56 UTC |
In Section
Seekers of Perl Wisdom