The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Apache::MagicPOST - Perl module to emulate arbitray HTTP methods through POST



*********************************************************************** NOTE: This module is not working as I intended since the poking into the POST data makes the data unavailable for subsequent modules. To make sure that you do not accidentally run into this, the handler method has been renamed to _handler(). I'll change this module to work with Apache2 (where the intended behavior is possible) in a while. ***********************************************************************

Apache::MagicPOST allows you to send HTTP methods to a server that are currently not supported by available browsers. The module, once installed in the PostReadRequest phase will react on the presence of the POST parameter 'method', alter the request method to the value of this parameter and turn all additional parameters into HTTP headers.

In your http.conf put the following line:

  PerlPostReadRequestHandler Apache::MagicPOST

If you need to override the default method parameter name 'method' (because you already use 'method' in your other HTML forms), use the following directive:

  PerlSetVar MagicPOSTMethodParamName yourParamName

Make sure you put it *before* other handlers of this phase so it gets invoked first.

In your HTML pages, put <form> tags like:

  <form method="POST">
    <input type="hidden" name="method" value="MONITOR" />
    <input type="text" name="Reply-To" value="" size="40" />

All parameters other than 'method' will be translated into HTTP headers.



Jan Algermissen,


Copyright 2003 , 2004 by Jan Algermissen

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.