Read from StnIn from POST is still broken?

Dave Cragg dcragg at lacscentre.co.uk
Tue Mar 7 05:02:40 EST 2006


On 6 Mar 2006, at 10:17, Mark Waddingham wrote:

> Hi Sivakatirswami,
>
>> Linux web server, Apache, call Rev CGI to receive incoming Post  
>> Data.  Beginning lines of script to read the incoming data -- see  
>> below (suggested as a possible fix years ago by Scott Raney)
>>
>> (musings... it is possible that this is a client side problem?
>> --machine A with browser B cannot in fact encode large chunks of  
>> data and the name=value pair actually arrive to the server already  
>> truncated.. meanwhile
>> -- box C with browser D submits a large text chunk from the same  
>> form and it arrive just fine: result Rev get blamed for being  
>> intermittent failures... but he's really not the bad guy.
>>
>> on startup
>> if $REQUEST_METHOD is "POST" then
>>     put "" into PostIn
>>     repeat until length(PostIn) >= $CONTENT_LENGTH
>>         read from stdin until ""
>>             put it after PostIn
>>       end repeat
>>     put  urlDecode (PostIn)  into tDataIn
>>
>>     split tDataIn by "&" and "="
>>     put keys(tDataIn) into tFields
>>
>> .....etc.
>
> There is no reason I can see (engine-side) as to why post data  
> should get truncated. That being said, however, you should ensure  
> that you pass '-ui' to the revolution engine when running as a CGI.

Has that option always been there?? And does it mean we don't need a  
Darwin engine to run on OS X?


>
> (i.e. the first line of a cgi script should be:
>   #! /<path to rev cgi>/revolution -ui
>
> [ The -ui option alters a few things internally, in particular  
> disables attempts to create any GUIs and enables stdin/stdout on  
> systems - such as Win32 - which don't by default have these enabled ]

Does using the -ui option on Win32 work with IIS? I was under the  
impression that the #! line wasn't read by IIS and it links the  
script to an executable using its own settings.

Dave



More information about the use-livecode mailing list