On Sun, Sep 30, 2001 at 03:23:51PM -0700, Alin Simionoiu wrote:
> Apache::Request->instance($r) will not work for POST reqests.
> At list will not do what you want.

Apache::Request->instance works very well with POST requests.

From the documentation:

  instance

  The instance() class method allows Apache::Request to
  be a singleton.  This means that whenever you call
  Apache::Request->instance() within a single request
  you always get the same Apache::Request object back.
  This solves the problem with creating the
  Apache::Request object twice within the same request -
  the symptoms being that the second Apache::Request
  object will not contain the form parameters because
  they have already been read and parsed.

  my $apr = Apache::Request->instance($r, DISABLE_UPLOADS => 1);

  Note that "instance()" call will take the same parame-
  ters as the above call to "new()", however the parame-
  ters will only have an effect the first time
  "instance()" is called within a single request. Extra
  parameters will be ignored on subsequent calls to
  "instance()" within the same request.

> Read this for more information:
> 
> http://perl.apache.org/guide/snippets.html#Reusing_Data_from_POST_request

Above instance method was made to avoid having to do workarounds like
that in the guide.

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer> 

Reply via email to