PageRenderTime 134ms CodeModel.GetById 3ms app.highlight 117ms RepoModel.GetById 1ms app.codeStats 1ms

/src/kilim/http/HttpRequestParser.java

http://github.com/kilim/kilim
Java | 1719 lines | 1424 code | 163 blank | 132 comment | 103 complexity | 97bc913f5d21af721e51bc51b78bfc43 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1
   2// line 1 "HttpRequestParser.rl"
   3/* Copyright (c) 2006, Sriram Srinivasan
   4 *
   5 * You may distribute this software under the terms of the license 
   6 * specified in the file "License"
   7 */
   8
   9package kilim.http;
  10
  11/**
  12 * --- DO NOT EDIT -----
  13 * HttpRequestParser.java generated from RAGEL (http://www.complang.org/ragel/) from the
  14 * specification file HttpRequestParser.rl. All changes must be made in the .rl file.
  15 **/
  16
  17import java.util.TimeZone;
  18import java.util.GregorianCalendar;
  19import java.nio.charset.Charset;
  20import java.nio.ByteBuffer;
  21import java.io.UnsupportedEncodingException;
  22import java.io.IOException;
  23import java.net.URLDecoder;
  24
  25public class HttpRequestParser {
  26  public static final Charset UTF8 = Charset.forName("UTF-8");
  27
  28  
  29// line 135 "HttpRequestParser.rl"
  30
  31
  32  
  33// line 34 "HttpRequestParser.java"
  34private static byte[] init__http_parser_actions_0()
  35{
  36	return new byte [] {
  37	    0,    1,    0,    1,    1,    1,    2,    1,    3,    1,    4,    1,
  38	    5,    1,    6,    1,    7,    1,    8,    1,    9,    1,   10,    1,
  39	   11,    1,   12,    1,   13,    2,    0,    3,    2,    0,    6,    2,
  40	    1,    5
  41	};
  42}
  43
  44private static final byte _http_parser_actions[] = init__http_parser_actions_0();
  45
  46
  47private static short[] init__http_parser_key_offsets_0()
  48{
  49	return new short [] {
  50	    0,    0,   10,   12,   14,   16,   18,   20,   21,   31,   41,   50,
  51	   52,   53,   54,   55,   56,   58,   61,   63,   66,   67,   69,   70,
  52	   72,   73,   75,   84,   93,   99,  105,  111,  117,  121,  125,  135,
  53	  141,  147,  156,  165,  171,  177,  179,  181,  183,  185,  187,  189,
  54	  191,  193,  195,  197,  199,  203,  205,  207,  209
  55	};
  56}
  57
  58private static final short _http_parser_key_offsets[] = init__http_parser_key_offsets_0();
  59
  60
  61private static char[] init__http_parser_trans_keys_0()
  62{
  63	return new char [] {
  64	   68,   71,   72,   79,   80,  100,  103,  104,  111,  112,   69,  101,
  65	   76,  108,   69,  101,   84,  116,   69,  101,   32,   32,   43,   47,
  66	   58,   45,   57,   65,   90,   97,  122,   43,   58,   45,   46,   48,
  67	   57,   65,   90,   97,  122,   32,   34,   35,   37,   60,   62,  127,
  68	    0,   31,   32,   72,   84,   84,   80,   47,   48,   57,   46,   48,
  69	   57,   48,   57,   13,   48,   57,   10,   13,   58,   58,   13,   32,
  70	   13,   10,   58,   32,   37,   60,   62,  127,    0,   31,   34,   35,
  71	   32,   37,   60,   62,  127,    0,   31,   34,   35,   48,   57,   65,
  72	   70,   97,  102,   48,   57,   65,   70,   97,  102,   48,   57,   65,
  73	   70,   97,  102,   48,   57,   65,   70,   97,  102,   32,   35,   59,
  74	   63,   32,   35,   59,   63,   32,   34,   35,   37,   60,   62,   63,
  75	  127,    0,   31,   48,   57,   65,   70,   97,  102,   48,   57,   65,
  76	   70,   97,  102,   32,   34,   35,   37,   60,   62,  127,    0,   31,
  77	   32,   34,   35,   37,   60,   62,  127,    0,   31,   48,   57,   65,
  78	   70,   97,  102,   48,   57,   65,   70,   97,  102,   69,  101,   84,
  79	  116,   69,  101,   65,   97,   68,  100,   80,  112,   84,  116,   73,
  80	  105,   79,  111,   78,  110,   83,  115,   79,   85,  111,  117,   83,
  81	  115,   84,  116,   84,  116,   58,    0
  82	};
  83}
  84
  85private static final char _http_parser_trans_keys[] = init__http_parser_trans_keys_0();
  86
  87
  88private static byte[] init__http_parser_single_lengths_0()
  89{
  90	return new byte [] {
  91	    0,   10,    2,    2,    2,    2,    2,    1,    4,    2,    7,    2,
  92	    1,    1,    1,    1,    0,    1,    0,    1,    1,    2,    1,    2,
  93	    1,    2,    5,    5,    0,    0,    0,    0,    4,    4,    8,    0,
  94	    0,    7,    7,    0,    0,    2,    2,    2,    2,    2,    2,    2,
  95	    2,    2,    2,    2,    4,    2,    2,    2,    1
  96	};
  97}
  98
  99private static final byte _http_parser_single_lengths[] = init__http_parser_single_lengths_0();
 100
 101
 102private static byte[] init__http_parser_range_lengths_0()
 103{
 104	return new byte [] {
 105	    0,    0,    0,    0,    0,    0,    0,    0,    3,    4,    1,    0,
 106	    0,    0,    0,    0,    1,    1,    1,    1,    0,    0,    0,    0,
 107	    0,    0,    2,    2,    3,    3,    3,    3,    0,    0,    1,    3,
 108	    3,    1,    1,    3,    3,    0,    0,    0,    0,    0,    0,    0,
 109	    0,    0,    0,    0,    0,    0,    0,    0,    0
 110	};
 111}
 112
 113private static final byte _http_parser_range_lengths[] = init__http_parser_range_lengths_0();
 114
 115
 116private static short[] init__http_parser_index_offsets_0()
 117{
 118	return new short [] {
 119	    0,    0,   11,   14,   17,   20,   23,   26,   28,   36,   43,   52,
 120	   55,   57,   59,   61,   63,   65,   68,   70,   73,   75,   78,   80,
 121	   83,   85,   88,   96,  104,  108,  112,  116,  120,  125,  130,  140,
 122	  144,  148,  157,  166,  170,  174,  177,  180,  183,  186,  189,  192,
 123	  195,  198,  201,  204,  207,  212,  215,  218,  221
 124	};
 125}
 126
 127private static final short _http_parser_index_offsets[] = init__http_parser_index_offsets_0();
 128
 129
 130private static byte[] init__http_parser_indicies_0()
 131{
 132	return new byte [] {
 133	    0,    2,    3,    4,    5,    0,    2,    3,    4,    5,    1,    6,
 134	    6,    1,    7,    7,    1,    8,    8,    1,    9,    9,    1,   10,
 135	   10,    1,   11,    1,   11,   12,   13,   14,   12,   12,   12,    1,
 136	   15,   16,   15,   15,   15,   15,    1,   17,    1,   18,   19,    1,
 137	    1,    1,    1,   16,   17,   20,    1,   21,    1,   22,    1,   23,
 138	    1,   24,    1,   25,    1,   26,   27,    1,   28,    1,   29,   28,
 139	    1,   30,    1,   32,    1,   31,   34,   33,   36,   37,   35,   39,
 140	   38,   40,   34,   33,   41,   43,    1,    1,    1,    1,    1,   42,
 141	   44,   46,    1,    1,    1,    1,    1,   45,   47,   47,   47,    1,
 142	   45,   45,   45,    1,   48,   48,   48,    1,   16,   16,   16,    1,
 143	   17,   18,   50,   51,   49,   52,   53,   54,   55,   49,   17,    1,
 144	   18,   56,    1,    1,   51,    1,    1,   50,   57,   57,   57,    1,
 145	   50,   50,   50,    1,   58,    1,   60,   61,    1,    1,    1,    1,
 146	   59,   62,    1,   64,   65,    1,    1,    1,    1,   63,   66,   66,
 147	   66,    1,   63,   63,   63,    1,   67,   67,    1,   68,   68,    1,
 148	   69,   69,    1,   70,   70,    1,   71,   71,    1,   72,   72,    1,
 149	   73,   73,    1,   74,   74,    1,   75,   75,    1,   76,   76,    1,
 150	   77,   77,    1,   78,   79,   78,   79,    1,   80,   80,    1,   81,
 151	   81,    1,   82,   82,    1,   34,   33,    0
 152	};
 153}
 154
 155private static final byte _http_parser_indicies[] = init__http_parser_indicies_0();
 156
 157
 158private static byte[] init__http_parser_trans_targs_0()
 159{
 160	return new byte [] {
 161	    2,    0,   41,   43,   46,   52,    3,    4,    5,    6,    7,    8,
 162	    9,   32,   10,    9,   10,   11,   26,   30,   12,   13,   14,   15,
 163	   16,   17,   18,   17,   19,   20,   21,   22,   25,   22,   23,   24,
 164	   20,   23,   24,   20,   56,   11,   27,   28,   11,   27,   28,   29,
 165	   31,   33,   34,   37,   11,   26,   34,   37,   35,   36,   11,   38,
 166	   26,   39,   11,   38,   26,   39,   40,   42,    7,   44,   45,    7,
 167	   47,   48,   49,   50,   51,    7,   53,   55,   54,    7,    7
 168	};
 169}
 170
 171private static final byte _http_parser_trans_targs[] = init__http_parser_trans_targs_0();
 172
 173
 174private static byte[] init__http_parser_trans_actions_0()
 175{
 176	return new byte [] {
 177	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   21,    0,
 178	    1,    1,    1,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 179	    0,    1,    0,    0,    0,   15,    0,    1,    1,    0,    5,    1,
 180	   29,    1,    0,    7,    0,   32,    1,    1,   13,    0,    0,    0,
 181	    0,    0,    0,    0,    9,    9,    9,    9,    0,    0,   35,    3,
 182	   35,    3,   11,    0,   11,    0,    0,    0,   17,    0,    0,   23,
 183	    0,    0,    0,    0,    0,   27,    0,    0,    0,   19,   25
 184	};
 185}
 186
 187private static final byte _http_parser_trans_actions[] = init__http_parser_trans_actions_0();
 188
 189
 190static final int http_parser_start = 1;
 191static final int http_parser_first_final = 56;
 192static final int http_parser_error = 0;
 193
 194static final int http_parser_en_main = 1;
 195
 196
 197// line 138 "HttpRequestParser.rl"
 198
 199  public static void err(String msg) throws IOException{
 200    throw new IOException(msg);
 201  }
 202
 203  public static void initHeader(HttpRequest req, int headerLength) throws IOException {
 204    ByteBuffer bb = req.buffer;
 205    /* required variables */
 206    byte[] data = bb.array();
 207    int p = 0;
 208    int pe = headerLength;
 209//  int eof = pe;
 210    int cs = 0;
 211
 212    // variables used by actions in http_req_parser machine above.
 213    int query_start = 0;
 214    int mark = 0;
 215    String field_name = "";
 216
 217    
 218// line 219 "HttpRequestParser.java"
 219	{
 220	cs = http_parser_start;
 221	}
 222
 223// line 158 "HttpRequestParser.rl"
 224    
 225// line 226 "HttpRequestParser.java"
 226	{
 227	int _klen;
 228	int _trans = 0;
 229	int _acts;
 230	int _nacts;
 231	int _keys;
 232	int _goto_targ = 0;
 233
 234	_goto: while (true) {
 235	switch ( _goto_targ ) {
 236	case 0:
 237	if ( p == pe ) {
 238		_goto_targ = 4;
 239		continue _goto;
 240	}
 241	if ( cs == 0 ) {
 242		_goto_targ = 5;
 243		continue _goto;
 244	}
 245case 1:
 246	_match: do {
 247	_keys = _http_parser_key_offsets[cs];
 248	_trans = _http_parser_index_offsets[cs];
 249	_klen = _http_parser_single_lengths[cs];
 250	if ( _klen > 0 ) {
 251		int _lower = _keys;
 252		int _mid;
 253		int _upper = _keys + _klen - 1;
 254		while (true) {
 255			if ( _upper < _lower )
 256				break;
 257
 258			_mid = _lower + ((_upper-_lower) >> 1);
 259			if ( data[p] < _http_parser_trans_keys[_mid] )
 260				_upper = _mid - 1;
 261			else if ( data[p] > _http_parser_trans_keys[_mid] )
 262				_lower = _mid + 1;
 263			else {
 264				_trans += (_mid - _keys);
 265				break _match;
 266			}
 267		}
 268		_keys += _klen;
 269		_trans += _klen;
 270	}
 271
 272	_klen = _http_parser_range_lengths[cs];
 273	if ( _klen > 0 ) {
 274		int _lower = _keys;
 275		int _mid;
 276		int _upper = _keys + (_klen<<1) - 2;
 277		while (true) {
 278			if ( _upper < _lower )
 279				break;
 280
 281			_mid = _lower + (((_upper-_lower) >> 1) & ~1);
 282			if ( data[p] < _http_parser_trans_keys[_mid] )
 283				_upper = _mid - 2;
 284			else if ( data[p] > _http_parser_trans_keys[_mid+1] )
 285				_lower = _mid + 2;
 286			else {
 287				_trans += ((_mid - _keys)>>1);
 288				break _match;
 289			}
 290		}
 291		_trans += _klen;
 292	}
 293	} while (false);
 294
 295	_trans = _http_parser_indicies[_trans];
 296	cs = _http_parser_trans_targs[_trans];
 297
 298	if ( _http_parser_trans_actions[_trans] != 0 ) {
 299		_acts = _http_parser_trans_actions[_trans];
 300		_nacts = (int) _http_parser_actions[_acts++];
 301		while ( _nacts-- > 0 )
 302	{
 303			switch ( _http_parser_actions[_acts++] )
 304			{
 305	case 0:
 306// line 31 "HttpRequestParser.rl"
 307	{mark = p; }
 308	break;
 309	case 1:
 310// line 33 "HttpRequestParser.rl"
 311	{query_start = p; }
 312	break;
 313	case 2:
 314// line 35 "HttpRequestParser.rl"
 315	{ 
 316      field_name = kw_lookup(data, mark, p);
 317      if (field_name == null) {// not a known keyword
 318        field_name = req.extractRange(mark, p);
 319      }
 320    }
 321	break;
 322	case 3:
 323// line 42 "HttpRequestParser.rl"
 324	{
 325      int value = encodeRange(mark, p);
 326      req.addField(field_name, value);
 327    }
 328	break;
 329	case 4:
 330// line 47 "HttpRequestParser.rl"
 331	{
 332      req.uriPath = req.extractRange(mark, p);
 333      String s = req.uriPath;
 334      int len = s.length();
 335      boolean need_decode;
 336      // Scan the string to see if the string requires any conversion.
 337      for (int i = 0; i < len; i++) {
 338         char c = s.charAt(i);
 339         if (c == '%' || c > 0x7F) {
 340           try {
 341              // TODO: Correct this. URLDecoder is broken for path (upto
 342              // JDK1.6): it converts'+' to ' ', which should
 343              // be done only for the query part of the url.
 344              req.uriPath = URLDecoder.decode(req.uriPath, "UTF-8");
 345              break;
 346           } catch (UnsupportedEncodingException ignore){}
 347         }
 348      }
 349    }
 350	break;
 351	case 5:
 352// line 72 "HttpRequestParser.rl"
 353	{
 354      req.queryStringRange = encodeRange(query_start, p);
 355    }
 356	break;
 357	case 6:
 358// line 76 "HttpRequestParser.rl"
 359	{ 
 360      req.uriFragmentRange = encodeRange(mark, p);
 361    }
 362	break;
 363	case 7:
 364// line 80 "HttpRequestParser.rl"
 365	{
 366      req.versionRange = encodeRange(mark, p);
 367    }
 368	break;
 369	case 8:
 370// line 119 "HttpRequestParser.rl"
 371	{req.method = "GET";}
 372	break;
 373	case 9:
 374// line 120 "HttpRequestParser.rl"
 375	{req.method = "POST";}
 376	break;
 377	case 10:
 378// line 121 "HttpRequestParser.rl"
 379	{req.method = "DELETE";}
 380	break;
 381	case 11:
 382// line 122 "HttpRequestParser.rl"
 383	{req.method = "HEAD";}
 384	break;
 385	case 12:
 386// line 123 "HttpRequestParser.rl"
 387	{req.method = "PUT";}
 388	break;
 389	case 13:
 390// line 124 "HttpRequestParser.rl"
 391	{req.method = "OPTIONS";}
 392	break;
 393// line 394 "HttpRequestParser.java"
 394			}
 395		}
 396	}
 397
 398case 2:
 399	if ( cs == 0 ) {
 400		_goto_targ = 5;
 401		continue _goto;
 402	}
 403	if ( ++p != pe ) {
 404		_goto_targ = 1;
 405		continue _goto;
 406	}
 407case 4:
 408case 5:
 409	}
 410	break; }
 411	}
 412
 413// line 159 "HttpRequestParser.rl"
 414    
 415    if (cs == http_parser_error) {
 416      throw new IOException("Malformed HTTP Header. p = " + p +", cs = " + cs);
 417    }
 418  }
 419
 420  /**
 421   * encode the start pos and length as ints;
 422   */
 423  public static int encodeRange(int start, int end) {
 424    return (start << 16) + end ;
 425  }
 426
 427  
 428// line 429 "HttpRequestParser.java"
 429private static byte[] init__http_keywords_actions_0()
 430{
 431	return new byte [] {
 432	    0,    1,    0,    1,    1,    1,    2,    1,    3,    1,    4,    1,
 433	    5,    1,    6,    1,    7,    1,    8,    1,    9,    1,   10,    1,
 434	   11,    1,   12,    1,   13,    1,   14,    1,   15,    1,   16,    1,
 435	   17,    1,   18,    1,   19,    1,   20,    1,   21,    1,   22,    1,
 436	   23,    1,   24,    1,   25,    1,   26,    1,   27,    1,   28,    1,
 437	   29,    1,   30,    1,   31,    1,   32,    1,   33,    1,   34,    1,
 438	   35,    1,   36,    1,   37,    1,   38,    1,   39,    1,   40,    1,
 439	   41,    1,   42,    1,   43,    1,   44,    1,   45,    1,   46,    1,
 440	   47,    1,   48,    1,   49,    1,   50
 441	};
 442}
 443
 444private static final byte _http_keywords_actions[] = init__http_keywords_actions_0();
 445
 446
 447private static short[] init__http_keywords_key_offsets_0()
 448{
 449	return new short [] {
 450	    0,    0,    8,   10,   12,   14,   16,   24,   26,   28,   30,   32,
 451	   34,   36,   38,   40,   42,   44,   46,   48,   50,   52,   54,   56,
 452	   58,   60,   62,   64,   66,   68,   70,   72,   74,   76,   78,   80,
 453	   82,   84,   86,   88,   90,   92,   94,   96,   98,  100,  102,  104,
 454	  108,  110,  112,  114,  115,  117,  119,  121,  123,  125,  127,  129,
 455	  131,  135,  137,  139,  141,  143,  145,  147,  149,  151,  153,  154,
 456	  164,  166,  168,  170,  172,  174,  176,  178,  184,  186,  188,  190,
 457	  192,  194,  196,  198,  200,  202,  204,  206,  208,  210,  212,  214,
 458	  216,  218,  219,  221,  223,  225,  227,  229,  231,  233,  235,  237,
 459	  239,  243,  245,  247,  249,  253,  255,  257,  259,  261,  263,  265,
 460	  267,  269,  271,  273,  275,  277,  278,  286,  290,  292,  294,  296,
 461	  298,  300,  302,  304,  306,  308,  309,  311,  313,  315,  317,  319,
 462	  321,  323,  325,  326,  328,  330,  332,  334,  336,  338,  340,  342,
 463	  344,  346,  348,  350,  352,  354,  356,  358,  360,  362,  363,  365,
 464	  367,  369,  371,  373,  377,  379,  381,  382,  384,  386,  388,  390,
 465	  392,  394,  396,  398,  400,  402,  404,  406,  408,  410,  412,  414,
 466	  415,  417,  419,  421,  423,  425,  427,  429,  431,  433,  437,  439,
 467	  441,  443,  445,  447,  448,  450,  452,  454,  456,  460,  462,  464,
 468	  466,  468,  470,  472,  474,  476,  478,  480,  482,  484,  486,  488,
 469	  490,  494,  496,  498,  500,  504,  506,  508,  510,  512,  514,  516,
 470	  517,  519,  521,  523,  525,  527,  529,  531,  533,  535,  537,  541,
 471	  543,  547,  549,  551,  553,  555,  557,  559,  561,  562,  564,  566,
 472	  568,  570,  572,  574,  576,  578,  582,  584,  586,  588,  590,  592,
 473	  594,  596,  597,  599,  601,  603,  605,  607,  611,  613,  615,  617,
 474	  621,  623,  625,  627,  629,  631,  633,  634,  636,  638,  640,  642,
 475	  644,  646,  648,  650,  652,  654,  656,  658,  690
 476	};
 477}
 478
 479private static final short _http_keywords_key_offsets[] = init__http_keywords_key_offsets_0();
 480
 481
 482private static char[] init__http_keywords_trans_keys_0()
 483{
 484	return new char [] {
 485	   67,   71,   76,   85,   99,  103,  108,  117,   67,   99,   69,  101,
 486	   80,  112,   84,  116,   67,   69,   76,   82,   99,  101,  108,  114,
 487	   72,  104,   65,   97,   82,  114,   83,  115,   69,  101,   84,  116,
 488	   78,  110,   67,   99,   79,  111,   68,  100,   73,  105,   78,  110,
 489	   71,  103,   65,   97,   78,  110,   71,  103,   85,  117,   65,   97,
 490	   71,  103,   69,  101,   65,   97,   78,  110,   71,  103,   69,  101,
 491	   83,  115,   69,  101,   76,  108,   79,  111,   87,  119,   84,  116,
 492	   72,  104,   79,  111,   82,  114,   73,  105,   90,  122,   65,   97,
 493	   84,  116,   73,  105,   79,  111,   78,  110,   65,   79,   97,  111,
 494	   67,   99,   72,  104,   69,  101,   45,   67,   99,   79,  111,   78,
 495	  110,   84,  116,   82,  114,   79,  111,   76,  108,   78,  110,   78,
 496	   84,  110,  116,   69,  101,   67,   99,   84,  116,   73,  105,   79,
 497	  111,   78,  110,   69,  101,   78,  110,   84,  116,   45,   69,   76,
 498	   77,   82,   84,  101,  108,  109,  114,  116,   78,  110,   67,   99,
 499	   79,  111,   68,  100,   73,  105,   78,  110,   71,  103,   65,   69,
 500	   79,   97,  101,  111,   78,  110,   71,  103,   85,  117,   65,   97,
 501	   71,  103,   69,  101,   78,  110,   71,  103,   84,  116,   72,  104,
 502	   67,   99,   65,   97,   84,  116,   73,  105,   79,  111,   78,  110,
 503	   68,  100,   53,   65,   97,   78,  110,   71,  103,   69,  101,   89,
 504	  121,   80,  112,   69,  101,   65,   97,   84,  116,   69,  101,   84,
 505	   88,  116,  120,   65,   97,   71,  103,   80,  112,   69,   73,  101,
 506	  105,   67,   99,   84,  116,   82,  114,   69,  101,   83,  115,   82,
 507	  114,   79,  111,   77,  109,   79,  111,   83,  115,   84,  116,   70,
 508	  102,   45,   77,   78,   82,   85,  109,  110,  114,  117,   65,   79,
 509	   97,  111,   84,  116,   67,   99,   72,  104,   68,  100,   73,  105,
 510	   70,  102,   73,  105,   69,  101,   68,  100,   45,   83,  115,   73,
 511	  105,   78,  110,   67,   99,   69,  101,   79,  111,   78,  110,   69,
 512	  101,   45,   77,  109,   65,   97,   84,  116,   67,   99,   72,  104,
 513	   65,   97,   78,  110,   71,  103,   69,  101,   78,  110,   77,  109,
 514	   79,  111,   68,  100,   73,  105,   70,  102,   73,  105,   69,  101,
 515	   68,  100,   45,   83,  115,   73,  105,   78,  110,   67,   99,   69,
 516	  101,   65,   79,   97,  111,   83,  115,   84,  116,   45,   77,  109,
 517	   79,  111,   68,  100,   73,  105,   70,  102,   73,  105,   69,  101,
 518	   68,  100,   67,   99,   65,   97,   84,  116,   73,  105,   79,  111,
 519	   78,  110,   65,   97,   88,  120,   45,   70,  102,   79,  111,   82,
 520	  114,   87,  119,   65,   97,   82,  114,   68,  100,   83,  115,   82,
 521	  114,   65,   79,   97,  111,   71,  103,   77,  109,   65,   97,   88,
 522	  120,   89,  121,   45,   65,   97,   85,  117,   84,  116,   72,  104,
 523	   69,   79,  101,  111,   78,  110,   84,  116,   73,  105,   67,   99,
 524	   65,   97,   84,  116,   69,  101,   82,  114,   73,  105,   90,  122,
 525	   65,   97,   84,  116,   73,  105,   79,  111,   78,  110,   65,   69,
 526	   97,  101,   78,  110,   71,  103,   69,  101,   70,   84,  102,  116,
 527	   69,  101,   82,  114,   69,  101,   82,  114,   82,  114,   89,  121,
 528	   45,   65,   97,   70,  102,   84,  116,   69,  101,   82,  114,   69,
 529	  101,   82,  114,   86,  118,   69,  101,   82,  114,   69,   82,  101,
 530	  114,   65,   97,   73,   78,  105,  110,   76,  108,   69,  101,   82,
 531	  114,   83,  115,   70,  102,   69,  101,   82,  114,   45,   69,  101,
 532	   78,  110,   67,   99,   79,  111,   68,  100,   73,  105,   78,  110,
 533	   71,  103,   80,   83,  112,  115,   71,  103,   82,  114,   65,   97,
 534	   68,  100,   69,  101,   69,  101,   82,  114,   45,   65,   97,   71,
 535	  103,   69,  101,   78,  110,   84,  116,   65,   73,   97,  105,   82,
 536	  114,   89,  121,   65,   97,   65,   87,   97,  119,   82,  114,   78,
 537	  110,   73,  105,   78,  110,   71,  103,   87,  119,   45,   65,   97,
 538	   85,  117,   84,  116,   72,  104,   69,  101,   78,  110,   84,  116,
 539	   73,  105,   67,   99,   65,   97,   84,  116,   69,  101,   65,   67,
 540	   68,   69,   70,   72,   73,   76,   77,   80,   82,   83,   84,   85,
 541	   86,   87,   97,   99,  100,  101,  102,  104,  105,  108,  109,  112,
 542	  114,  115,  116,  117,  118,  119,   45,    0
 543	};
 544}
 545
 546private static final char _http_keywords_trans_keys[] = init__http_keywords_trans_keys_0();
 547
 548
 549private static byte[] init__http_keywords_single_lengths_0()
 550{
 551	return new byte [] {
 552	    0,    8,    2,    2,    2,    2,    8,    2,    2,    2,    2,    2,
 553	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 554	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 555	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    4,
 556	    2,    2,    2,    1,    2,    2,    2,    2,    2,    2,    2,    2,
 557	    4,    2,    2,    2,    2,    2,    2,    2,    2,    2,    1,   10,
 558	    2,    2,    2,    2,    2,    2,    2,    6,    2,    2,    2,    2,
 559	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 560	    2,    1,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 561	    4,    2,    2,    2,    4,    2,    2,    2,    2,    2,    2,    2,
 562	    2,    2,    2,    2,    2,    1,    8,    4,    2,    2,    2,    2,
 563	    2,    2,    2,    2,    2,    1,    2,    2,    2,    2,    2,    2,
 564	    2,    2,    1,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 565	    2,    2,    2,    2,    2,    2,    2,    2,    2,    1,    2,    2,
 566	    2,    2,    2,    4,    2,    2,    1,    2,    2,    2,    2,    2,
 567	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    1,
 568	    2,    2,    2,    2,    2,    2,    2,    2,    2,    4,    2,    2,
 569	    2,    2,    2,    1,    2,    2,    2,    2,    4,    2,    2,    2,
 570	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 571	    4,    2,    2,    2,    4,    2,    2,    2,    2,    2,    2,    1,
 572	    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    4,    2,
 573	    4,    2,    2,    2,    2,    2,    2,    2,    1,    2,    2,    2,
 574	    2,    2,    2,    2,    2,    4,    2,    2,    2,    2,    2,    2,
 575	    2,    1,    2,    2,    2,    2,    2,    4,    2,    2,    2,    4,
 576	    2,    2,    2,    2,    2,    2,    1,    2,    2,    2,    2,    2,
 577	    2,    2,    2,    2,    2,    2,    2,   32,    1
 578	};
 579}
 580
 581private static final byte _http_keywords_single_lengths[] = init__http_keywords_single_lengths_0();
 582
 583
 584private static byte[] init__http_keywords_range_lengths_0()
 585{
 586	return new byte [] {
 587	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 588	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 589	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 590	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 591	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 592	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 593	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 594	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 595	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 596	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 597	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 598	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 599	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 600	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 601	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 602	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 603	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 604	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 605	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 606	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 607	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 608	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 609	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 610	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 611	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 612	    0,    0,    0,    0,    0,    0,    0,    0,    0
 613	};
 614}
 615
 616private static final byte _http_keywords_range_lengths[] = init__http_keywords_range_lengths_0();
 617
 618
 619private static short[] init__http_keywords_index_offsets_0()
 620{
 621	return new short [] {
 622	    0,    0,    9,   12,   15,   18,   21,   30,   33,   36,   39,   42,
 623	   45,   48,   51,   54,   57,   60,   63,   66,   69,   72,   75,   78,
 624	   81,   84,   87,   90,   93,   96,   99,  102,  105,  108,  111,  114,
 625	  117,  120,  123,  126,  129,  132,  135,  138,  141,  144,  147,  150,
 626	  155,  158,  161,  164,  166,  169,  172,  175,  178,  181,  184,  187,
 627	  190,  195,  198,  201,  204,  207,  210,  213,  216,  219,  222,  224,
 628	  235,  238,  241,  244,  247,  250,  253,  256,  263,  266,  269,  272,
 629	  275,  278,  281,  284,  287,  290,  293,  296,  299,  302,  305,  308,
 630	  311,  314,  316,  319,  322,  325,  328,  331,  334,  337,  340,  343,
 631	  346,  351,  354,  357,  360,  365,  368,  371,  374,  377,  380,  383,
 632	  386,  389,  392,  395,  398,  401,  403,  412,  417,  420,  423,  426,
 633	  429,  432,  435,  438,  441,  444,  446,  449,  452,  455,  458,  461,
 634	  464,  467,  470,  472,  475,  478,  481,  484,  487,  490,  493,  496,
 635	  499,  502,  505,  508,  511,  514,  517,  520,  523,  526,  528,  531,
 636	  534,  537,  540,  543,  548,  551,  554,  556,  559,  562,  565,  568,
 637	  571,  574,  577,  580,  583,  586,  589,  592,  595,  598,  601,  604,
 638	  606,  609,  612,  615,  618,  621,  624,  627,  630,  633,  638,  641,
 639	  644,  647,  650,  653,  655,  658,  661,  664,  667,  672,  675,  678,
 640	  681,  684,  687,  690,  693,  696,  699,  702,  705,  708,  711,  714,
 641	  717,  722,  725,  728,  731,  736,  739,  742,  745,  748,  751,  754,
 642	  756,  759,  762,  765,  768,  771,  774,  777,  780,  783,  786,  791,
 643	  794,  799,  802,  805,  808,  811,  814,  817,  820,  822,  825,  828,
 644	  831,  834,  837,  840,  843,  846,  851,  854,  857,  860,  863,  866,
 645	  869,  872,  874,  877,  880,  883,  886,  889,  894,  897,  900,  903,
 646	  908,  911,  914,  917,  920,  923,  926,  928,  931,  934,  937,  940,
 647	  943,  946,  949,  952,  955,  958,  961,  964,  997
 648	};
 649}
 650
 651private static final short _http_keywords_index_offsets[] = init__http_keywords_index_offsets_0();
 652
 653
 654private static short[] init__http_keywords_trans_targs_0()
 655{
 656	return new short [] {
 657	    2,   32,   33,   36,    2,   32,   33,   36,    0,    3,    3,    0,
 658	    4,    4,    0,    5,    5,    0,  308,  308,    0,    7,   13,   20,
 659	   27,    7,   13,   20,   27,  307,    8,    8,  307,    9,    9,  307,
 660	   10,   10,  307,   11,   11,  307,   12,   12,  307,  307,  307,  307,
 661	   14,   14,  307,   15,   15,  307,   16,   16,  307,   17,   17,  307,
 662	   18,   18,  307,   19,   19,  307,  307,  307,  307,   21,   21,  307,
 663	   22,   22,  307,   23,   23,  307,   24,   24,  307,   25,   25,  307,
 664	   26,   26,  307,  307,  307,  307,   28,   28,  307,   29,   29,  307,
 665	   30,   30,  307,   31,   31,  307,  307,  307,  307,  307,  307,    0,
 666	   34,   34,    0,   35,   35,    0,  307,  307,    0,   37,   37,    0,
 667	   38,   38,    0,   39,   39,    0,   40,   40,    0,   41,   41,    0,
 668	   42,   42,    0,   43,   43,    0,   44,   44,    0,   45,   45,    0,
 669	   46,   46,    0,  307,  307,    0,   48,   59,   48,   59,    0,   49,
 670	   49,    0,   50,   50,    0,   51,   51,    0,   52,    0,   53,   53,
 671	    0,   54,   54,    0,   55,   55,    0,   56,   56,    0,   57,   57,
 672	    0,   58,   58,    0,  307,  307,    0,   60,   60,    0,   61,   67,
 673	   61,   67,    0,   62,   62,    0,   63,   63,    0,   64,   64,    0,
 674	   65,   65,    0,   66,   66,    0,  307,  307,    0,   68,   68,    0,
 675	   69,   69,    0,   70,   70,    0,   71,    0,   72,   79,   96,   98,
 676	  102,   72,   79,   96,   98,  102,    0,   73,   73,    0,   74,   74,
 677	    0,   75,   75,    0,   76,   76,    0,   77,   77,    0,   78,   78,
 678	    0,  307,  307,    0,   80,   86,   90,   80,   86,   90,    0,   81,
 679	   81,    0,   82,   82,    0,   83,   83,    0,   84,   84,    0,   85,
 680	   85,    0,  307,  307,    0,   87,   87,    0,   88,   88,    0,   89,
 681	   89,    0,  307,  307,    0,   91,   91,    0,   92,   92,    0,   93,
 682	   93,    0,   94,   94,    0,   95,   95,    0,  307,  307,    0,   97,
 683	   97,    0,  307,    0,   99,   99,    0,  100,  100,    0,  101,  101,
 684	    0,  307,  307,    0,  103,  103,    0,  104,  104,    0,  307,  307,
 685	    0,  106,  106,    0,  107,  107,    0,  307,  307,    0,  109,  111,
 686	  109,  111,    0,  110,  110,    0,  307,  307,    0,  112,  112,    0,
 687	  113,  115,  113,  115,    0,  114,  114,    0,  307,  307,    0,  116,
 688	  116,    0,  117,  117,    0,  307,  307,    0,  119,  119,    0,  120,
 689	  120,    0,  307,  307,    0,  122,  122,    0,  123,  123,    0,  307,
 690	  307,    0,  125,  125,    0,  126,    0,  127,  143,  152,  156,  127,
 691	  143,  152,  156,    0,  128,  131,  128,  131,    0,  129,  129,    0,
 692	  130,  130,    0,  307,  307,    0,  132,  132,    0,  133,  133,    0,
 693	  134,  134,    0,  135,  135,    0,  136,  136,    0,  137,  137,    0,
 694	  138,    0,  139,  139,    0,  140,  140,    0,  141,  141,    0,  142,
 695	  142,    0,  307,  307,    0,  144,  144,    0,  145,  145,    0,  146,
 696	  146,    0,  147,    0,  148,  148,    0,  149,  149,    0,  150,  150,
 697	    0,  151,  151,    0,  307,  307,    0,  153,  153,    0,  154,  154,
 698	    0,  155,  155,    0,  307,  307,    0,  157,  157,    0,  158,  158,
 699	    0,  159,  159,    0,  160,  160,    0,  161,  161,    0,  162,  162,
 700	    0,  163,  163,    0,  164,  164,    0,  165,  165,    0,  166,    0,
 701	  167,  167,    0,  168,  168,    0,  169,  169,    0,  170,  170,    0,
 702	  307,  307,    0,  172,  183,  172,  183,    0,  173,  173,    0,  174,
 703	  174,    0,  175,    0,  176,  176,    0,  177,  177,    0,  178,  178,
 704	    0,  179,  179,    0,  180,  180,    0,  181,  181,    0,  182,  182,
 705	    0,  307,  307,    0,  184,  184,    0,  185,  185,    0,  186,  186,
 706	    0,  187,  187,    0,  188,  188,    0,  307,  307,    0,  190,  190,
 707	    0,  191,  191,    0,  192,    0,  193,  193,    0,  194,  194,    0,
 708	  195,  195,    0,  196,  196,    0,  197,  197,    0,  198,  198,    0,
 709	  199,  199,    0,  307,  307,    0,  201,  201,    0,  202,  205,  202,
 710	  205,    0,  203,  203,    0,  204,  204,    0,  307,  307,    0,  206,
 711	  206,    0,  207,  207,    0,  208,    0,  209,  209,    0,  210,  210,
 712	    0,  211,  211,    0,  212,  212,    0,  213,  220,  213,  220,    0,
 713	  214,  214,    0,  215,  215,    0,  216,  216,    0,  217,  217,    0,
 714	  218,  218,    0,  219,  219,    0,  307,  307,    0,  221,  221,    0,
 715	  222,  222,    0,  223,  223,    0,  224,  224,    0,  225,  225,    0,
 716	  226,  226,    0,  227,  227,    0,  307,  307,    0,  229,  232,  229,
 717	  232,    0,  230,  230,    0,  231,  231,    0,  307,  307,    0,  233,
 718	  237,  233,  237,    0,  234,  234,    0,  235,  235,    0,  236,  236,
 719	    0,  307,  307,    0,  238,  238,    0,  239,  239,    0,  240,    0,
 720	  241,  241,    0,  242,  242,    0,  243,  243,    0,  244,  244,    0,
 721	  307,  307,    0,  246,  246,    0,  247,  247,    0,  248,  248,    0,
 722	  249,  249,    0,  307,  307,    0,  307,  251,  307,  251,    0,  252,
 723	  252,    0,  253,  256,  253,  256,    0,  254,  254,    0,  255,  255,
 724	    0,  307,  307,    0,  257,  257,    0,  258,  258,    0,  259,  259,
 725	    0,  260,  260,    0,  261,    0,  262,  262,    0,  263,  263,    0,
 726	  264,  264,    0,  265,  265,    0,  266,  266,    0,  267,  267,    0,
 727	  268,  268,    0,  307,  307,    0,  270,  275,  270,  275,    0,  271,
 728	  271,    0,  272,  272,    0,  273,  273,    0,  274,  274,    0,  307,
 729	  307,    0,  276,  276,    0,  277,  277,    0,  278,    0,  279,  279,
 730	    0,  280,  280,    0,  281,  281,    0,  282,  282,    0,  307,  307,
 731	    0,  284,  286,  284,  286,    0,  285,  285,    0,  307,  307,    0,
 732	  307,  307,    0,  288,  293,  288,  293,    0,  289,  289,    0,  290,
 733	  290,    0,  291,  291,    0,  292,  292,    0,  307,  307,    0,  294,
 734	  294,    0,  295,    0,  296,  296,    0,  297,  297,    0,  298,  298,
 735	    0,  299,  299,    0,  300,  300,    0,  301,  301,    0,  302,  302,
 736	    0,  303,  303,    0,  304,  304,    0,  305,  305,    0,  306,  306,
 737	    0,  307,  307,    0,    1,   47,  105,  108,  118,  121,  124,  171,
 738	  189,  200,  228,  245,  250,  269,  283,  287,    1,   47,  105,  108,
 739	  118,  121,  124,  171,  189,  200,  228,  245,  250,  269,  283,  287,
 740	    0,    6,  307,  307,  307,  307,  307,  307,  307,  307,  307,  307,
 741	  307,  307,  307,  307,  307,  307,  307,  307,  307,  307,  307,  307,
 742	  307,  307,  307,  307,  307,  307,    0
 743	};
 744}
 745
 746private static final short _http_keywords_trans_targs[] = init__http_keywords_trans_targs_0();
 747
 748
 749private static byte[] init__http_keywords_trans_actions_0()
 750{
 751	return new byte [] {
 752	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 753	    0,    0,    0,    0,    0,    0,    5,    5,    0,    0,    0,    0,
 754	    0,    0,    0,    0,    0,  101,    0,    0,  101,    0,    0,  101,
 755	    0,    0,  101,    0,    0,  101,    0,    0,  101,    7,    7,  101,
 756	    0,    0,  101,    0,    0,  101,    0,    0,  101,    0,    0,  101,
 757	    0,    0,  101,    0,    0,  101,    9,    9,  101,    0,    0,  101,
 758	    0,    0,  101,    0,    0,  101,    0,    0,  101,    0,    0,  101,
 759	    0,    0,  101,   11,   11,  101,    0,    0,  101,    0,    0,  101,
 760	    0,    0,  101,    0,    0,  101,   13,   13,  101,   15,   15,    0,
 761	    0,    0,    0,    0,    0,    0,   17,   17,    0,    0,    0,    0,
 762	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 763	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 764	    0,    0,    0,   19,   19,    0,    0,    0,    0,    0,    0,    0,
 765	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 766	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 767	    0,    0,    0,    0,   21,   21,    0,    0,    0,    0,    0,    0,
 768	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 769	    0,    0,    0,    0,    0,    0,   23,   23,    0,    0,    0,    0,
 770	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 771	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 772	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 773	    0,   25,   25,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 774	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 775	    0,    0,   27,   27,    0,    0,    0,    0,    0,    0,    0,    0,
 776	    0,    0,   29,   29,    0,    0,    0,    0,    0,    0,    0,    0,
 777	    0,    0,    0,    0,    0,    0,    0,    0,   31,   31,    0,    0,
 778	    0,    0,   33,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 779	    0,   35,   35,    0,    0,    0,    0,    0,    0,    0,   37,   37,
 780	    0,    0,    0,    0,    0,    0,    0,   39,   39,    0,    0,    0,
 781	    0,    0,    0,    0,    0,    0,   41,   41,    0,    0,    0,    0,
 782	    0,    0,    0,    0,    0,    0,    0,    0,   43,   43,    0,    0,
 783	    0,    0,    0,    0,    0,   45,   45,    0,    0,    0,    0,    0,
 784	    0,    0,   47,   47,    0,    0,    0,    0,    0,    0,    0,   49,
 785	   49,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 786	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 787	    0,    0,    0,   51,   51,    0,    0,    0,    0,    0,    0,    0,
 788	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 789	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 790	    0,    0,   53,   53,    0,    0,    0,    0,    0,    0,    0,    0,
 791	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 792	    0,    0,    0,    0,   55,   55,    0,    0,    0,    0,    0,    0,
 793	    0,    0,    0,    0,   57,   57,    0,    0,    0,    0,    0,    0,
 794	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 795	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 796	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 797	   59,   59,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 798	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 799	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 800	    0,   61,   61,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 801	    0,    0,    0,    0,    0,    0,    0,   63,   63,    0,    0,    0,
 802	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 803	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 804	    0,    0,    0,   65,   65,    0,    0,    0,    0,    0,    0,    0,
 805	    0,    0,    0,    0,    0,    0,    0,    0,   67,   67,    0,    0,
 806	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 807	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 808	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 809	    0,    0,    0,    0,    0,    0,   69,   69,    0,    0,    0,    0,
 810	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 811	    0,    0,    0,    0,    0,    0,   71,   71,    0,    0,    0,    0,
 812	    0,    0,    0,    0,    0,    0,    0,    0,   73,   73,    0,    0,
 813	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 814	    0,   75,   75,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 815	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 816	   77,   77,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 817	    0,    0,    0,   79,   79,    0,   81,    0,   81,    0,    0,    0,
 818	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 819	    0,   83,   83,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 820	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 821	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 822	    0,    0,    0,   85,   85,    0,    0,    0,    0,    0,    0,    0,
 823	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   87,
 824	   87,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 825	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   89,   89,
 826	    0,    0,    0,    0,    0,    0,    0,    0,    0,   91,   91,    0,
 827	   93,   93,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 828	    0,    0,    0,    0,    0,    0,    0,    0,   95,   95,    0,    0,
 829	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 830	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 831	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 832	    0,   97,   97,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 833	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 834	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 835	    0,    0,   99,  101,  101,  101,  101,  101,  101,  101,  101,  101,
 836	  101,  101,  101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
 837	  101,  101,  101,  101,  101,   99,    0
 838	};
 839}
 840
 841private static final byte _http_keywords_trans_actions[] = init__http_keywords_trans_actions_0();
 842
 843
 844private static byte[] init__http_keywords_to_state_actions_0()
 845{
 846	return new byte [] {
 847	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 848	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 849	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 850	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 851	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 852	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 853	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 854	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 855	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 856	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 857	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 858	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 859	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 860	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 861	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 862	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 863	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 864	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 865	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 866	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 867	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 868	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 869	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 870	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 871	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 872	    0,    0,    0,    0,    0,    0,    0,    1,    0
 873	};
 874}
 875
 876private static final byte _http_keywords_to_state_actions[] = init__http_keywords_to_state_actions_0();
 877
 878
 879private static byte[] init__http_keywords_from_state_actions_0()
 880{
 881	return new byte [] {
 882	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 883	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 884	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 885	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 886	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 887	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 888	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 889	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 890	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 891	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 892	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 893	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 894	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 895	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 896	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 897	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 898	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 899	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 900	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 901	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 902	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 903	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 904	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 905	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 906	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 907	    0,    0,    0,    0,    0,    0,    0,    3,    0
 908	};
 909}
 910
 911private static final byte _http_keywords_from_state_actions[] = init__http_keywords_from_state_actions_0();
 912
 913
 914private static short[] init__http_keywords_eof_trans_0()
 915{
 916	return new short [] {
 917	    0,    0,    0,    0,    0,    0, 1025, 1025, 1025, 1025, 1025, 1025,
 918	 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025,
 919	 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025,    0,    0,    0,    0,
 920	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 921	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 922	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 923	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 924	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 925	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 926	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 927	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 928	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 929	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 930	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 931	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 932	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 933	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 934	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 935	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 936	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 937	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 938	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 939	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 940	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 941	    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 942	    0,    0,    0,    0,    0,    0,    0,    0, 1026
 943	};
 944}
 945
 946private static final short _http_keywords_eof_trans[] = init__http_keywords_eof_trans_0();
 947
 948
 949static final int http_keywords_start = 307;
 950static final int http_keywords_first_final = 307;
 951static final int http_keywords_error = 0;
 952
 953static final int http_keywords_en_main = 307;
 954
 955
 956// line 226 "HttpRequestParser.rl"
 957
 958
 959  @SuppressWarnings("unused")
 960  public static String kw_lookup(byte[] data, int start, int len) {
 961//    String req = null;
 962    int ts, te, act;
 963
 964//    int wb = 0;
 965    int p = start;
 966    int pe = start + len;
 967    int eof = pe;
 968    int cs;
 969    String kw = null;
 970    
 971// line 972 "HttpRequestParser.java"
 972	{
 973	cs = http_keywords_start;
 974	ts = -1;
 975	te = -1;
 976	act = 0;
 977	}
 978
 979// line 240 "HttpRequestParser.rl"
 980    
 981// line 982 "HttpRequestParser.java"
 982	{
 983	int _klen;
 984	int _trans = 0;
 985	int _acts;
 986	int _nacts;
 987	int _keys;
 988	int _goto_targ = 0;
 989
 990	_goto: while (true) {
 991	switch ( _goto_targ ) {
 992	case 0:
 993	if ( p == pe ) {
 994		_goto_targ = 4;
 995		continue _goto;
 996	}
 997	if ( cs == 0 ) {
 998		_goto_targ = 5;
 999		continue _goto;
1000	}
1001case 1:
1002	_acts = _http_keywords_from_state_actions[cs];
1003	_nacts = (int) _http_keywords_actions[_acts++];
1004	while ( _nacts-- > 0 ) {
1005		switch ( _http_keywords_actions[_acts++] ) {
1006	case 1:
1007// line 1 "HttpRequestParser.rl"
1008	{ts = p;}
1009	break;
1010// line 1011 "HttpRequestParser.java"
1011		}
1012	}
1013
1014	_match: do {
1015	_keys = _http_keywords_key_offsets[cs];
1016	_trans = _http_keywords_index_offsets[cs];
1017	_klen = _http_keywords_single_lengths[cs];
1018	if ( _klen > 0 ) {
1019		int _lower = _keys;
1020		int _mid;
1021		int _upper = _keys + _klen - 1;
1022		while (true) {
1023			if ( _upper < _lower )
1024				break;
1025
1026			_mid = _lower + ((_upper-_lower) >> 1);
1027			if ( data[p] < _http_keywords_trans_keys[_mid] )
1028				_upper = _mid - 1;
1029			else if ( data[p] > _http_keywords_trans_keys[_mid] )
1030				_lower = _mid + 1;
1031			else {
1032				_trans += (_mid - _keys);
1033				break _match;
1034			}
1035		}
1036		_keys += _klen;
1037		_trans += _klen;
1038	}
1039
1040	_klen = _http_keywords_range_lengths[cs];
1041	if ( _klen > 0 ) {
1042		int _lower = _keys;
1043		int _mid;
1044		int _upper = _keys + (_klen<<1) - 2;
1045		while (true) {
1046			if ( _upper < _lower )
1047				break;
1048
1049			_mid = _lower + (((_upper-_lower) >> 1) & ~1);
1050			if ( data[p] < _http_keywords_trans_keys[_mid] )
1051				_upper = _mid - 2;
1052			else if ( data[p] > _http_keywords_trans_keys[_mid+1] )
1053				_lower = _mid + 2;
1054			else {
1055				_trans += ((_mid - _keys)>>1);
1056				break _match;
1057			}
1058		}
1059		_trans += _klen;
1060	}
1061	} while (false);
1062
1063case 3:
1064	cs = _http_keywords_trans_targs[_trans];
1065
1066	if ( _http_keywords_trans_actions[_trans] != 0 ) {
1067		_acts = _http_keywords_trans_actions[_trans];
1068		_nacts = (int) _http_keywords_actions[_acts++];
1069		while ( _nacts-- > 0 )
1070	{
1071			switch ( _http_keywords_actions[_acts++] )
1072			{
1073	case 2:
1074// line 1 "HttpRequestParser.rl"
1075	{te = p+1;}
1076	break;
1077	case 3:
1078// line 177 "HttpRequestParser.rl"
1079	{te = p+1;{ kw = "Accept-Charset";}}
1080	break;
1081	case 4:
1082// line 178 "HttpRequestParser.rl"
1083	{te = p+1;{ kw = "Accept-Encoding";}}
1084	break;
1085	case 5:
1086// line 179 "HttpRequestParser.rl"
1087	{te = p+1;{ kw = "Accept-Language";}}
1088	break;
1089	case 6:
1090// line 180 "HttpRequestParser.rl"
1091	{te = p+1;{ kw = "Accept-Ranges";}}
1092	break;
1093	case 7:
1094// line 181 "HttpRequestParser.rl"
1095	{te = p+1;{ kw = "Age";}}
1096	break;
1097	case 8:
1098// line 182 "HttpRequestParser.rl"
1099	{te = p+1;{ kw = "Allow";}}
1100	break;
1101	case 9:
1102// line 183 "HttpRequestParser.rl"
1103	{te = p+1;{ kw = "Authorization";}}
1104	break;
1105	case 10:
1106// line 184 "HttpRequestParser.rl"
1107	{te = p+1;{ kw = "Cache-Control";}}
1108	break;
1109	case 11:
1110// line 185 "HttpRequestParser.rl"
1111	{te = p+1;{ kw = "Connection";}}
1112	break;
1113	case 12:
1114// line 186 "HttpRequestParser.rl"
1115	{te = p+1;{ kw = "Content-Encoding";}}
1116	break;
1117	case 13:
1118// line 187 "HttpRequestParser.rl"
1119	{te = p+1;{ kw = "Content-Language";}}
1120	break;
1121	case 14:
1122// line 188 "HttpRequestParser.rl"
1123	{te = p+1;{ kw = "Content-Length";}}
1124	break;
1125	case 15:
1126// line 189 "HttpRequestParser.rl"
1127	{te = p+1;{ kw = "Content-Location";}}
1128	break;
1129	case 16:
1130// line 190 "HttpRequestParser.rl"
1131	{te = p+1;{ kw = "Content-MD5";}}
1132	break;
1133	case 17:
1134// line 191 "HttpRequestParser.rl"
1135	{te = p+1;{ kw = "Content-Range";}}
1136	break;
1137	case 18:
1138// line 192 "HttpRequestParser.rl"
1139	{te = p+1;{ kw = "Content-Type";}}
1140	break;
1141	case 19:
1142// line 193 "HttpRequ

Large files files are truncated, but you can click here to view the full file