Dear List Members:
I've been through every kind of documentation I can find, trying to
understand the "stdin" function of an .mt script on my server.
Here's my cgi script:
#!/usr/bin/mc
on startup
read from stdin until empty
put "Stdin received: " & it after buffer
put "Content-Type: text/html" & cr
put "Content-Length:" && the length of buffer & cr & cr
put buffer
end startup
Here's the button script that calls it:
on mouseUp
put cr&"test="&urlEncode(fld "PlainText") into tEncoded
post tEncoded to url fld "CGI URL"
put it
end mouseUp
Following advice from the mail archives I tried including the line:
#set httpheaders to "Content-type: application/x-www-form-urlencoded"&return
in my button script. Watching the stream in Interarchy, this had no effect,
so I carefully inserted into the POSTHEADER custom property of the libURL
stack the same string.
This produced the desired effect in the stream, but the problem still
exists: the appearance of no stdin when the cgi script is called from my
stack....
Is this a problem with my server, or with MC, or my scripts?
I have searched in vain for an example of a cgi script that works similarly.
Any advice?
- Charles
--
Charles Buchwald
Design & Programming
eTraffic Solutions, Inc.
Victoria, BC
Canada
www.etrafficsolutions.com
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.