Read from StnIn from POST is still broken?
katir at hindu.org
Fri Mar 3 21:48:19 EST 2006
This is a really old problem: Rev CGI scripts are truncating data
piped from Apache from a POST....
Does anyone know for "positively absolutely" sure that new version of
rev has over come this issue?
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
-- 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.
if $REQUEST_METHOD is "POST" then
put "" into PostIn
repeat until length(PostIn) >= $CONTENT_LENGTH
read from stdin until ""
put it after PostIn
put urlDecode (PostIn) into tDataIn
split tDataIn by "&" and "="
put keys(tDataIn) into tFields
if one of the incoming name pairs contains too much data, it is
You can stress test this yourself: go to:
and scroll down to the end of the list...the last "story is a
submission with a large text chunk pasted into the main field.
The full cgi is here:
More information about the Use-livecode