Apache Traffic Server Rewrite Header Plugin
This is a plugin for ATS (Apache Traffic Server), that allows you to
perform various header "rewrite" rules (operations) on a request or
response. Currently, only one operation is supported, since we had to get
this rolling asap.

Note that currently only static string "values" are supported. We'll add
advanced features to allow for expansions in a future release.


Operations
----------

  rm-header header-name			[flags]
  add-header header "string"		[flags]
  set-status status-code		[flags]
  set-status-reason reason-string	[flags]
  no-op		    			[flags]


The following operator(s) currently only works when instantiating the
plugin as a remap plugin:

  set-destination [qual] value

Where qual is one of the support URL qualifiers

  HOST
  PORT
  PATH
  QUERY

For example (as a remap rule):

  cond %{HEADER:X-Mobile} = "foo"
  set-destination HOST foo.mobile.bar.com [L]



Operation flags
---------------
  [L]	Last rule, do not continue


Conditions
----------

  cond %{STATUS} operand	[flags]
  cond %{RANDOM:nn} operand	[flags]
  cond %{ACCESS:file}		[flags]
  cond %{TRUE}			[flags]
  cond %{FALSE}			[flags]
  cond %{HEADER:header-name}	[flags]


These conditions have to be first in a ruleset, and you can only have one:

  cond %{READ_RESPONSE_HDR_HOOK}   (this is the default hook)
  cond %{READ_REQUEST_HDR_HOOK}
  cond %{SEND_REQUEST_HDR_HOOK}
  cond %{SEND_RESPONSE_HDR_HOOK}


Condition flags
---------------
  [AND]	AND with next condition (default)
  [OR]	OR with next condition
  [NOT]	Invert this condition


Operands to conditions
----------------------
  =val	Lexically equal
  <val	Lexically less then
  >val	Lexically greater then   



RELEASES
--------
Version 2.0.0 (6/8/12, bcall)
-- Ported to ATS

Version 1.7.3 (12/01/11,sambani)
-- changed mdbm locks to mutex

Version 1.7.2 (10/18/11,cdoshi)
-- check for url redirect length

Version 1.7.1 (10/18/11,cdoshi)
-- use size_t instead of unsigned

Version 1.7.0 (10/17/11,cdoshi)
 - Support for %{PATH}

Version 1.6.9 (10,17,11,cdoshi)
 - Support for PATH condition

Version 1.6.8 (10/17/11,cdoshi)
 -  Replace the INKHttpHdrStatusSet with INKHttptxnSetHttpRetStatus 

Version 1.6.7 (07/21/11, bcall)
  - [bug 4699620] - Removed some extra printf()'s

Version 1.6.6 (cdoshi)
  - when Host adder is added setHostChange will be called 

Version 1.6.5 (cdoshi)
  - fix QSA for set-destination

Version 1.6.4 (cdoshi)
  - support QSA for set-destination

Version 1.6.3 (cdoshi)
  - support the query,fix the remap stuff

Version 1.6.2 (cdoshi)
  - Support for regex matcher

Version 1.6.1 (09/15/10, leif)
  - [bug 3985913] 

Version 1.6.0 (07/14/10, leif)
  - Added support for the timeout-out operator.
  - Added support for the set-redirect operator.
  - Added support for INK_HTTP_READ_REQUEST_PRE_REMAP_HOOK (this means we
  now require YTS 1.18.1 or later).

Version 1.5.0 (06/02/10, leif)
  - Add support for running as a remap plugin.
  - Add support for set-destination operator (this currently only works in
  a remap plugin).

Version 1.4.1 (02/09/10, leif)
  - Cleanup of error messages.
  - Changed name from MDBM to DBM.

Version 1.4 (01/20/10, leif)
  - Added support for CLIENT-HEADER condition.
  - Cleanup in flags handling and features.
  - Support MDBM as a condition.

Version 1.3.1 (12/22/09, leif)
  - Fixed package to support MDBM v2.x and v3.x.

Version 1.3 (12/22/09, leif)
  - Refactored to allow conditions to be used as values.
  - Added condition for HEADER.
  - Added condition for MDBM lookups.
  - Fixed consistency problems on HOOK names.

Version 1.2 (10/28/09, leif)
  - Added support for SEND_RESPONSE_HDR_HOOK.

Version 1.1 (10/08/09, leif)
  - Added support for SEND_REQUEST_HDR_HOOK.

Version 1.0 (9/24/09, leif)
  - Added support for two hooks.
  - Added "add-header". Remember to "rm-header" the header first if you
  want to assure there's only one version.
  - Added support for %{RANDOM:NN} condition
  - Added support for %{ACCESS:file} condition
  - Lots of more code cleanup.

Version 0.2 (7/24/09, leif)
  - Added support for some basic conditions.
  - Added support for setting the return status code and reason.

Version 0.1 (7/13/09, leif)
  - Initial version.
