somewhat OT : Rev cgi & Safari

Dave Cragg dcragg at
Fri Mar 24 07:21:20 EST 2006

On 23 Mar 2006, at 11:18, jbv wrote:

> Hi list,
> I'm using Rev cgi and have a problem debugging a script :
> it's a (rather) complex subscription page to a website, with
> a sophisticated form and javascript functions, and on the server
> side a cgi with a mySQL connection.
> Everything works fine except for 1 version of Safari. The agent
> information for that version is :
> Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/312.8
> (KHTML, like Gecko) Safari/312.6
> in short, some elements of the HTML form are skipped when the
> user clicks the submit button...
> And to make things even more difficult (to reproduce and correct
> the bug, or find a workaround), this seems to happen only
> sporadically; i mean that using that specific version of Safari
> doesn't systematically lead to the bug...

Coming late to this.

Are you sure the problem is with Safari and not at the CGI end? When  
you say some elements of the form are being skipped, what appears at  
the CGI end? Are some arbitrary form elements missing, or is it that  
the posted data is truncated? (I'm assuming the form is using POST  
and not GET. If not, you can ignore this?)

If it appears that the data is truncated, it may be the reading of  
the data in the CGI that is the problem. There is a known issue  
concerning reading from stdin in a cgi script if you just do this:

      read from stdin for $CONTENT_LENGTH

To be sure you get all the data, you need to do something like this:

       put empty into tBuf
       repeat while length(tBuf) < $CONTENT_LENGTH
         read from stdin for $CONTENT_LENGTH
         put it after tBuf
       end repeat

If you know all this, my apologies. But just in case you're looking  
in the wrong place.


More information about the Use-livecode mailing list