Apache-RewritingProxy

 view release on metacpan or  search on metacpan

RewritingProxy.pm  view on Meta::CPAN


# This is the function that one would replace if one were to 
# want to change the way this program handled text.
sub mainTextHandler
  {
  my $r = shift;
  my $string = shift;
  return($string);
  }

# We just escape the necessary crap in the URL we are given so that
# it can then be compared in a regex and all will be happy
sub regexEscape
  {
  my $url = shift;
  # This silly little regex fixes (*&?+|) in the URL for me.
  # withhout this regex, any of these characters in a URL will
  # cause a server error (unless they resolve into something
  # sensible to regex, in which case the server does something
  # magical and unpredictable with the URL)
  $url =~ s/(\-|\[|\]|\(|\)|\*|\+|\?|\||\&)/\\$1/g;



( run in 0.377 second using v1.01-cache-2.11-cpan-c21f80fb71c )