parser.c
author Mahlon E. Smith <mahlon@martini.nu>
Wed, 28 Sep 2011 09:04:16 -0700
changeset 8 8d0f25ef038e
parent 2 8c88756f81b0
child 9 bdf20e6eefd7
permissions -rw-r--r--
Add common archive files (LICENCE, README, etc) and a 'release' Makefile target.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     1
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     2
/* #line 1 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     3
/* vim: set noet nosta sw=4 ts=4 ft=ragel : */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     4
/*
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     5
Copyright (c) 2011, Mahlon E. Smith <mahlon@martini.nu>
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     6
All rights reserved.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     7
Redistribution and use in source and binary forms, with or without
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     8
modification, are permitted provided that the following conditions are met:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
     9
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    10
    * Redistributions of source code must retain the above copyright
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    11
      notice, this list of conditions and the following disclaimer.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    12
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    13
    * Redistributions in binary form must reproduce the above copyright
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    14
      notice, this list of conditions and the following disclaimer in the
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    15
      documentation and/or other materials provided with the distribution.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    16
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    17
    * Neither the name of Mahlon E. Smith nor the names of his
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    18
      contributors may be used to endorse or promote products derived
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    19
      from this software without specific prior written permission.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    20
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    21
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    22
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    23
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    24
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    25
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    26
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    27
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    28
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    29
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    30
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    31
*/
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    32
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    33
/*
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    34
Squid docs:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    35
---------------------------------------------------------------------------
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    36
TAG: url_rewrite_program
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    37
Specify the location of the executable for the URL rewriter.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    38
Since they can perform almost any function there isn't one included.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    39
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    40
For each requested URL rewriter will receive on line with the format
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    41
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    42
URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL>
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    43
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    44
In the future, the rewriter interface will be extended with
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    45
key=value pairs ("kvpairs" shown above).  Rewriter programs
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    46
should be prepared to receive and possibly ignore additional
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    47
whitespace-separated tokens on each input line.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    48
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    49
And the rewriter may return a rewritten URL. The other components of
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    50
the request line does not need to be returned (ignored if they are).
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    51
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    52
The rewriter can also indicate that a client-side redirect should
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    53
be performed to the new URL. This is done by prefixing the returned
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    54
URL with "301:" (moved permanently) or 302: (moved temporarily).
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    55
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    56
By default, a URL rewriter is not used.
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    57
---------------------------------------------------------------------------
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    58
*/
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    59
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    60
#include "volta.h"
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    61
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    62
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    63
/* #line 80 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    64
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    65
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    66
/* #line 67 "parser.c" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    67
static const int redirector_start = 1;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    68
static const int redirector_first_final = 13;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    69
static const int redirector_error = 0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    70
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    71
static const int redirector_en_main = 1;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    72
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    73
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    74
/* #line 82 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    75
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    76
/*
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    77
%%{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    78
	machine redirector;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    79
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    80
	action yay {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    81
		printf( "I saw: %s", p+1 );
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    82
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    83
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    84
	# http://, ftp://, https://, etc
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    85
	proto = alpha{3,5} . '://';
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    86
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    87
	# http://mahlon:password@example.com or http://mahlon@example.com
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    88
    #       username              optional password
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    89
	creds = ( alnum | [+._\-] )+ . ( ':' . any+ )? . '@';
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    90
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    91
	main := ( proto . creds ) | proto @yay '\n';
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    92
}%%
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    93
%% write data;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    94
*/
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    95
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    96
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    97
/*
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    98
%%{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
    99
	machine foo;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   100
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   101
	OPEN = 0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   102
	CLOSE = 1;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   103
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   104
	main :=
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   105
		start:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   106
		door_closed: (
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   107
			OPEN -> door_open -> final
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   108
		),
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   109
		door_open: (
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   110
			CLOSE -> door_closed
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   111
		);
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   112
}%%
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   113
*/
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   114
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   115
struct request *
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   116
parse( char *p )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   117
{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   118
   	/* initial machine state */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   119
	short int cs = 0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   120
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   121
	/* the client request object */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   122
	request c_request;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   123
	request *cp_request = &c_request;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   124
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   125
	/*
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   126
	char ip[ INET_ADDRSTRLEN ];
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   127
	inet_pton( AF_INET, "127.0.0.1", &cp_request->ip );
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   128
	inet_ntop( AF_INET, &cp_request->ip, ip, INET_ADDRSTRLEN );
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   129
	*/
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   130
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   131
	/* initalize state machine with current line */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   132
	char *pe = p + strlen(p) + 1;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   133
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   134
	/* enter state machine */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   135
	
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   136
/* #line 137 "parser.c" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   137
	{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   138
	cs = redirector_start;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   139
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   140
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   141
/* #line 143 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   142
	
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   143
/* #line 144 "parser.c" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   144
	{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   145
	if ( p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   146
		goto _test_eof;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   147
	switch ( cs )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   148
	{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   149
case 1:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   150
	if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   151
		if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   152
			goto st2;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   153
	} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   154
		goto st2;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   155
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   156
st0:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   157
cs = 0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   158
	goto _out;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   159
st2:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   160
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   161
		goto _test_eof2;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   162
case 2:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   163
	if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   164
		if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   165
			goto st3;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   166
	} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   167
		goto st3;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   168
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   169
st3:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   170
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   171
		goto _test_eof3;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   172
case 3:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   173
	if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   174
		if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   175
			goto st4;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   176
	} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   177
		goto st4;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   178
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   179
st4:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   180
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   181
		goto _test_eof4;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   182
case 4:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   183
	if ( (*p) == 58 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   184
		goto st5;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   185
	if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   186
		if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   187
			goto st11;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   188
	} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   189
		goto st11;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   190
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   191
st5:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   192
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   193
		goto _test_eof5;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   194
case 5:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   195
	if ( (*p) == 47 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   196
		goto st6;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   197
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   198
st6:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   199
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   200
		goto _test_eof6;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   201
case 6:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   202
	if ( (*p) == 47 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   203
		goto tr7;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   204
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   205
tr7:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   206
/* #line 68 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   207
	{
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   208
		printf( "I saw: %s", p+1 );
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   209
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   210
	goto st7;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   211
st7:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   212
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   213
		goto _test_eof7;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   214
case 7:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   215
/* #line 216 "parser.c" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   216
	switch( (*p) ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   217
		case 10: goto st13;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   218
		case 43: goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   219
		case 95: goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   220
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   221
	if ( (*p) < 48 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   222
		if ( 45 <= (*p) && (*p) <= 46 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   223
			goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   224
	} else if ( (*p) > 57 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   225
		if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   226
			if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   227
				goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   228
		} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   229
			goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   230
	} else
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   231
		goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   232
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   233
st13:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   234
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   235
		goto _test_eof13;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   236
case 13:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   237
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   238
st8:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   239
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   240
		goto _test_eof8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   241
case 8:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   242
	switch( (*p) ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   243
		case 43: goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   244
		case 58: goto st9;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   245
		case 64: goto st13;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   246
		case 95: goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   247
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   248
	if ( (*p) < 48 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   249
		if ( 45 <= (*p) && (*p) <= 46 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   250
			goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   251
	} else if ( (*p) > 57 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   252
		if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   253
			if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   254
				goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   255
		} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   256
			goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   257
	} else
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   258
		goto st8;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   259
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   260
st9:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   261
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   262
		goto _test_eof9;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   263
case 9:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   264
	goto st10;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   265
st10:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   266
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   267
		goto _test_eof10;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   268
case 10:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   269
	if ( (*p) == 64 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   270
		goto st14;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   271
	goto st10;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   272
st14:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   273
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   274
		goto _test_eof14;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   275
case 14:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   276
	if ( (*p) == 64 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   277
		goto st14;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   278
	goto st10;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   279
st11:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   280
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   281
		goto _test_eof11;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   282
case 11:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   283
	if ( (*p) == 58 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   284
		goto st5;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   285
	if ( (*p) > 90 ) {
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   286
		if ( 97 <= (*p) && (*p) <= 122 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   287
			goto st12;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   288
	} else if ( (*p) >= 65 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   289
		goto st12;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   290
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   291
st12:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   292
	if ( ++p == pe )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   293
		goto _test_eof12;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   294
case 12:
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   295
	if ( (*p) == 58 )
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   296
		goto st5;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   297
	goto st0;
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   298
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   299
	_test_eof2: cs = 2; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   300
	_test_eof3: cs = 3; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   301
	_test_eof4: cs = 4; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   302
	_test_eof5: cs = 5; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   303
	_test_eof6: cs = 6; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   304
	_test_eof7: cs = 7; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   305
	_test_eof13: cs = 13; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   306
	_test_eof8: cs = 8; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   307
	_test_eof9: cs = 9; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   308
	_test_eof10: cs = 10; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   309
	_test_eof14: cs = 14; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   310
	_test_eof11: cs = 11; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   311
	_test_eof12: cs = 12; goto _test_eof; 
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   312
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   313
	_test_eof: {}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   314
	_out: {}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   315
	}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   316
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   317
/* #line 144 "parser.rl" */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   318
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   319
	/* reset the request */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   320
	/* c_request = reset_request; */
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   321
	return( cp_request );
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   322
}
8c88756f81b0 Ensure that parsing can't be subverted by requests larger than the
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff changeset
   323