+/**
+ * The most compatible set of actions - i.e. none.
+ */
+#define ACTION_MOST_COMPATIBLE 0x00000000UL
+
+/** Action bitmap: Block the request. */
+#define ACTION_BLOCK 0x00000001UL
+/** Action bitmap: Deanimate if it's a GIF. */
+#define ACTION_DEANIMATE 0x00000002UL
+/** Action bitmap: Downgrade HTTP/1.1 to 1.0. */
+#define ACTION_DOWNGRADE 0x00000004UL
+/** Action bitmap: Fast redirects. */
+#define ACTION_FAST_REDIRECTS 0x00000008UL
+/** Action bitmap: Remove or add "X-Forwarded-For" header. */
+#define ACTION_CHANGE_X_FORWARDED_FOR 0x00000010UL
+/** Action bitmap: Hide "From" header. */
+#define ACTION_HIDE_FROM 0x00000020UL
+/** Action bitmap: Hide "Referer" header. (sic - follow HTTP, not English). */
+#define ACTION_HIDE_REFERER 0x00000040UL
+/** Action bitmap: Hide "User-Agent" and similar headers. */
+#define ACTION_HIDE_USER_AGENT 0x00000080UL
+/** Action bitmap: This is an image. */
+#define ACTION_IMAGE 0x00000100UL
+/** Action bitmap: Sets the image blocker. */
+#define ACTION_IMAGE_BLOCKER 0x00000200UL
+/** Action bitmap: Prevent compression. */
+#define ACTION_NO_COMPRESSION 0x00000400UL
+/** Action bitmap: Change cookies to session only cookies. */
+#define ACTION_SESSION_COOKIES_ONLY 0x00000800UL
+/** Action bitmap: Block cookies coming from the client. */
+#define ACTION_CRUNCH_OUTGOING_COOKIES 0x00001000UL
+/** Action bitmap: Block cookies coming from the server. */
+#define ACTION_CRUNCH_INCOMING_COOKIES 0x00002000UL
+/** Action bitmap: Override the forward settings in the config file */
+#define ACTION_FORWARD_OVERRIDE 0x00004000UL
+/** Action bitmap: Block as empty document */
+#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x00008000UL
+/** Action bitmap: Limit CONNECT requests to safe ports. */
+#define ACTION_LIMIT_CONNECT 0x00010000UL
+/** Action bitmap: Redirect request. */
+#define ACTION_REDIRECT 0x00020000UL
+/** Action bitmap: Crunch or modify "if-modified-since" header. */
+#define ACTION_HIDE_IF_MODIFIED_SINCE 0x00040000UL
+/** Action bitmap: Overwrite Content-Type header. */
+#define ACTION_CONTENT_TYPE_OVERWRITE 0x00080000UL
+/** Action bitmap: Crunch specified server header. */
+#define ACTION_CRUNCH_SERVER_HEADER 0x00100000UL
+/** Action bitmap: Crunch specified client header */
+#define ACTION_CRUNCH_CLIENT_HEADER 0x00200000UL
+/** Action bitmap: Enable text mode by force */
+#define ACTION_FORCE_TEXT_MODE 0x00400000UL
+/** Action bitmap: Enable text mode by force */
+#define ACTION_CRUNCH_IF_NONE_MATCH 0x00800000UL
+/** Action bitmap: Enable content-disposition crunching */
+#define ACTION_HIDE_CONTENT_DISPOSITION 0x01000000UL
+/** Action bitmap: Replace or block Last-Modified header */
+#define ACTION_OVERWRITE_LAST_MODIFIED 0x02000000UL
+/** Action bitmap: Replace or block Accept-Language header */
+#define ACTION_HIDE_ACCEPT_LANGUAGE 0x04000000UL
+/** Action bitmap: Limit the cookie lifetime */
+#define ACTION_LIMIT_COOKIE_LIFETIME 0x08000000UL
+
+
+/** Action string index: How to deanimate GIFs */
+#define ACTION_STRING_DEANIMATE 0
+/** Action string index: Replacement for "From:" header */
+#define ACTION_STRING_FROM 1
+/** Action string index: How to block images */
+#define ACTION_STRING_IMAGE_BLOCKER 2
+/** Action string index: Replacement for "Referer:" header */
+#define ACTION_STRING_REFERER 3
+/** Action string index: Replacement for "User-Agent:" header */
+#define ACTION_STRING_USER_AGENT 4
+/** Action string index: Legal CONNECT ports. */
+#define ACTION_STRING_LIMIT_CONNECT 5
+/** Action string index: Server headers containing this pattern are crunched*/
+#define ACTION_STRING_SERVER_HEADER 6
+/** Action string index: Client headers containing this pattern are crunched*/
+#define ACTION_STRING_CLIENT_HEADER 7
+/** Action string index: Replacement for the "Accept-Language:" header*/
+#define ACTION_STRING_LANGUAGE 8
+/** Action string index: Replacement for the "Content-Type:" header*/
+#define ACTION_STRING_CONTENT_TYPE 9
+/** Action string index: Replacement for the "content-disposition:" header*/
+#define ACTION_STRING_CONTENT_DISPOSITION 10
+/** Action string index: Replacement for the "If-Modified-Since:" header*/
+#define ACTION_STRING_IF_MODIFIED_SINCE 11
+/** Action string index: Replacement for the "Last-Modified:" header. */
+#define ACTION_STRING_LAST_MODIFIED 12
+/** Action string index: Redirect URL */
+#define ACTION_STRING_REDIRECT 13
+/** Action string index: Decode before redirect? */
+#define ACTION_STRING_FAST_REDIRECTS 14
+/** Action string index: Overriding forward rule. */
+#define ACTION_STRING_FORWARD_OVERRIDE 15
+/** Action string index: Reason for the block. */
+#define ACTION_STRING_BLOCK 16
+/** Action string index: what to do with the "X-Forwarded-For" header. */
+#define ACTION_STRING_CHANGE_X_FORWARDED_FOR 17
+/** Action string index: how many minutes cookies should be valid. */
+#define ACTION_STRING_LIMIT_COOKIE_LIFETIME 18
+/** Number of string actions. */
+#define ACTION_STRING_COUNT 19
+
+
+/* To make the ugly hack in sed easier to understand */
+#define CHECK_EVERY_HEADER_REMAINING 0
+
+
+/** Index into current_action_spec::multi[] for headers to add. */
+#define ACTION_MULTI_ADD_HEADER 0
+/** Index into current_action_spec::multi[] for content filters to apply. */
+#define ACTION_MULTI_FILTER 1
+/** Index into current_action_spec::multi[] for server-header filters to apply. */
+#define ACTION_MULTI_SERVER_HEADER_FILTER 2
+/** Index into current_action_spec::multi[] for client-header filters to apply. */
+#define ACTION_MULTI_CLIENT_HEADER_FILTER 3
+/** Index into current_action_spec::multi[] for client-header tags to apply. */
+#define ACTION_MULTI_CLIENT_HEADER_TAGGER 4
+/** Index into current_action_spec::multi[] for server-header tags to apply. */
+#define ACTION_MULTI_SERVER_HEADER_TAGGER 5
+/** Number of multi-string actions. */
+#define ACTION_MULTI_EXTERNAL_FILTER 6
+/** Number of multi-string actions. */
+#define ACTION_MULTI_COUNT 7
+
+
+/**
+ * This structure contains a list of actions to apply to a URL.
+ * It only contains positive instructions - no "-" options.
+ * It is not used to store the actions list itself, only for
+ * url_actions() to return the current values.
+ */