Accessing POST Data More Than Once

Ben Gribaudo <[email protected]> Mon, 14 Nov 2005 13:36:39 -0600
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hi,

How do I access POSTed data more than one time from a script?

If you submit data using the example below, the first 
Apache.request.read returns the POSTed data while subsequent calls 
return nil instead of repeating the POSTed data.

Thank you,
Ben Gribaudo

<pre>
<%
puts Apache.request.read # expected data
puts Apache.request.read # nil
puts Apache.request.read # nil
%>
</pre>
<form method="post">
<input type="text" name="test" />
<input type="submit" />
</form>