Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Can't access {POST|PUT}DATA from CGI script

by vendion (Scribe)
on Aug 16, 2011 at 12:56 UTC ( [id://920482]=note: print w/replies, xml ) Need Help??


in reply to Re: Can't access {POST|PUT}DATA from CGI script
in thread Can't access {POST|PUT}DATA from CGI script

My CGI module 3.52, and the version on my production server is newer, I would say 3.55 because it was installed via CPAN last week. As for how curl works when given the -T flag it does a PUT and looks like this

PUT /cgi-bin/api.pl?mode=MultiSpeak3 HTTP/1.1 User-Agent: curl/7.21.7 (x86_64-unknown-linux-gnu) libcurl/7.21.7 Open +SSL/1.0.0d zlib/1.2.5 libssh2/1.2.7 Host: localhost Accept: */* Content-Length: 6581 Expect: 100-continue (data)

I placed a copy of the full PUT in my scratchpad includeing the data that I am trying to send. If I don't use the CGI module and grab from <STDIN> I am able to get the data back, doing it this way may make things harder on me in the long run which is why I am trying to use the CGI Module in the first place. I thought that maybe the CGI moudle was chocking on the newlines in the sample file that I have to work from but making a copy of it and stripping them out did not help.

EDIT: Using your suggestion of LWP I was able to do a PUT to my script and it returned the data, so my problem is with CURL not giving a conetent type/CGI looking for a content type and not finding one or a little of both...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://920482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found