MC> > Presently I get all the incoming parameters via Apache::Request and 
MC> > append to the URL before redirecting but this is not ideal as I?d like 
MC> > to spit the modified parameters out in a POST. Can anyone give me any 
MC> > advice?

GY> see
GY> http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_POST_Requests


I thought I recalled a $STDIN var in mod_perl, but didn't find anything with a quick 
scan of the docs. If that var ~is~ available, and writable, and are doing an internal 
redirect, you might be able to just reload it:

  $STDIN = $r->content;
  $r->internal_redirect_handler($handler);


I know I've done this sort of thing (redirecting POSTs) with a session system. That 
is, a handler early in the request that sets up POST data, then everything else uses 
only that source:

  # My::STDINHandler
  use Storable;
  sub handler {
    store({content => $r->content}, $unique_file_location);
  }

  sub content {
    return retrieve($unique_file_location)->{content}
      if $some_good_tests;
    return Apache->request->content;
  }


  # My script
  $content = My::STDINHandler::content();



I apologize for any inconsistencies in this message, I'm a bit tired and the coffee 
isn't strong enough today.

---
Rodney Broom
President, R.Broom Consulting
http://www.rbroom.com/


Reply via email to