Support for HTTP POST.
authorkapejod <kapejod@linux-9x1z.site>
Tue, 19 Nov 2013 12:38:16 +0000 (13:38 +0100)
committerAndy Green <andy.green@linaro.org>
Sun, 24 Nov 2013 02:36:37 +0000 (10:36 +0800)
Rewritten by Andy Green to use chunks, add timeout, use extra states in handshake not parser.

Signed-off-by: Andy Green <andy@warmcat.com>
changelog
lib/handshake.c
lib/lextable.h
lib/libwebsockets.c
lib/libwebsockets.h
lib/minilex.c
lib/parsers.c
lib/private-libwebsockets.h
test-server/test-server.c

index c2904ef..99758be 100644 (file)
--- a/changelog
+++ b/changelog
@@ -3,6 +3,23 @@ Changelog
 
 (since v1.23)
 
+User api additions
+------------------
+
+POST method is supported
+
+The protocol 0 / HTTP callback can now get two new kinds of callback,
+LWS_CALLBACK_HTTP_BODY (in and len are a chunk of the body of the HTTP request)
+and LWS_CALLBACK_HTTP_BODY_COMPLETION (the expected amount of body has arrived
+and been passed to the user code already).  These callbacks are used with the
+post method (see the test server for details).
+
+The period between the HTTP header completion and the completion of the body
+processing is protected by a 5s timeout.
+
+The chunks are stored in a malloc'd buffer of size protocols[0].rx_buffer_size.
+
+
 User api changes
 ----------------
 
index 1935c25..e853f57 100644 (file)
@@ -59,10 +59,67 @@ libwebsocket_read(struct libwebsocket_context *context,
 {
        size_t n;
        struct allocated_headers *ah;
-       char *uri_ptr;
-       int uri_len;
+       char *uri_ptr = NULL;
+       int uri_len = 0;
+       char content_length_str[32];
 
        switch (wsi->state) {
+
+       case WSI_STATE_HTTP_BODY:
+http_postbody:
+               while (len--) {
+
+                       if (wsi->u.http.content_length_seen >= wsi->u.http.content_length)
+                               break;
+
+                       wsi->u.http.post_buffer[wsi->u.http.body_index++] = *buf++;
+                       wsi->u.http.content_length_seen++;
+                       if (wsi->u.http.body_index !=
+                                       wsi->protocol->rx_buffer_size &&
+                           wsi->u.http.content_length_seen != wsi->u.http.content_length)
+                               continue;
+
+                       if (wsi->protocol->callback) {
+                               n = wsi->protocol->callback(
+                                       wsi->protocol->owning_server, wsi,
+                                           LWS_CALLBACK_HTTP_BODY,
+                                           wsi->user_space, wsi->u.http.post_buffer,
+                                                       wsi->u.http.body_index);
+                               wsi->u.http.body_index = 0;
+                               if (n)
+                                       goto bail;
+                       }
+
+                       if (wsi->u.http.content_length_seen == wsi->u.http.content_length) {
+                               /* he sent the content in time */
+                               libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
+                               n = wsi->protocol->callback(
+                                       wsi->protocol->owning_server, wsi,
+                                           LWS_CALLBACK_HTTP_BODY_COMPLETION,
+                                           wsi->user_space, NULL, 0);
+                               wsi->u.http.body_index = 0;
+                               if (n)
+                                       goto bail;
+                       }
+
+               }
+
+               /* 
+                * we need to spill here so everything is seen in the case
+                * there is no content-length
+                */
+               if (wsi->u.http.body_index && wsi->protocol->callback) {
+                       n = wsi->protocol->callback(
+                               wsi->protocol->owning_server, wsi,
+                                   LWS_CALLBACK_HTTP_BODY,
+                                   wsi->user_space, wsi->u.http.post_buffer,
+                                               wsi->u.http.body_index);
+                       wsi->u.http.body_index = 0;
+                       if (n)
+                               goto bail;
+               }
+               break;
+
        case WSI_STATE_HTTP_ISSUING_FILE:
        case WSI_STATE_HTTP:
                wsi->state = WSI_STATE_HTTP_HEADERS;
@@ -93,194 +150,248 @@ libwebsocket_read(struct libwebsocket_context *context,
 #ifndef LWS_NO_SERVER
                /* LWS_CONNMODE_WS_SERVING */
 
-               for (n = 0; n < len; n++)
+               while (len--) {
                        if (libwebsocket_parse(wsi, *buf++)) {
                                lwsl_info("libwebsocket_parse failed\n");
                                goto bail_nuke_ah;
                        }
 
-               if (wsi->u.hdr.parser_state != WSI_PARSING_COMPLETE)
-                       break;
+                       if (wsi->u.hdr.parser_state != WSI_PARSING_COMPLETE)
+                               continue;
 
-               lwsl_parser("libwebsocket_parse sees parsing complete\n");
+                       lwsl_parser("libwebsocket_parse sees parsing complete\n");
 
-               wsi->mode = LWS_CONNMODE_PRE_WS_SERVING_ACCEPT;
+                       wsi->mode = LWS_CONNMODE_PRE_WS_SERVING_ACCEPT;
 
-               /* is this websocket protocol or normal http 1.0? */
+                       /* is this websocket protocol or normal http 1.0? */
 
-               if (!lws_hdr_total_length(wsi, WSI_TOKEN_UPGRADE) ||
-                            !lws_hdr_total_length(wsi, WSI_TOKEN_CONNECTION)) {
+                       if (!lws_hdr_total_length(wsi, WSI_TOKEN_UPGRADE) ||
+                                    !lws_hdr_total_length(wsi, WSI_TOKEN_CONNECTION)) {
 
-                       /* it's not websocket.... shall we accept it as http? */
+                               /* it's not websocket.... shall we accept it as http? */
 
-                       if (!lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI)) {
-                               lwsl_warn("Missing URI in HTTP request\n");
-                               goto bail_nuke_ah;
-                       }
+                               if (!lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI) &&
+                                   !lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI)) {
+                                       lwsl_warn("Missing URI in HTTP request\n");
+                                       goto bail_nuke_ah;
+                               }
 
-                       lwsl_info("HTTP request for '%s'\n",
-                               lws_hdr_simple_ptr(wsi, WSI_TOKEN_GET_URI));
+                               if (lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI) &&
+                                   lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI)) {
+                                       lwsl_warn("GET and POST methods?\n");
+                                       goto bail_nuke_ah;
+                               }
 
-                       if (libwebsocket_ensure_user_space(wsi))
-                               goto bail_nuke_ah;
+                               if (libwebsocket_ensure_user_space(wsi))
+                                       goto bail_nuke_ah;
 
-                       /*
-                        * Hm we still need the headers so the
-                        * callback can look at leaders like the URI, but we
-                        * need to transition to http union state.... hold a
-                        * copy of u.hdr.ah and deallocate afterwards
-                        */
+                               if (lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI)) {
+                                       uri_ptr = lws_hdr_simple_ptr(wsi, WSI_TOKEN_GET_URI);
+                                       uri_len = lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI);
+                                       lwsl_info("HTTP GET request for '%s'\n",
+                                           lws_hdr_simple_ptr(wsi, WSI_TOKEN_GET_URI));
 
-                       ah = wsi->u.hdr.ah;
-                       uri_ptr = lws_hdr_simple_ptr(wsi, WSI_TOKEN_GET_URI);
-                       uri_len = lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI);
+                               }
+                               if (lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI)) {
+                                       lwsl_info("HTTP POST request for '%s'\n",
+                                          lws_hdr_simple_ptr(wsi, WSI_TOKEN_POST_URI));
+                                       uri_ptr = lws_hdr_simple_ptr(wsi, WSI_TOKEN_POST_URI);
+                                       uri_len = lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI);
+                               }
 
-                       /* union transition */
-                       memset(&wsi->u, 0, sizeof(wsi->u));
-                       wsi->mode = LWS_CONNMODE_HTTP_SERVING_ACCEPTED;
-                       wsi->state = WSI_STATE_HTTP;
-                       wsi->u.http.fd = -1;
-
-                       /* expose it at the same offset as u.hdr */
-                       wsi->u.http.ah = ah;
-
-                       n = 0;
-                       if (wsi->protocol->callback)
-                               n = wsi->protocol->callback(context, wsi,
-                                   LWS_CALLBACK_FILTER_HTTP_CONNECTION,
-                                   wsi->user_space, uri_ptr, uri_len);
-
-                       if (!n && wsi->protocol->callback)
-                               n = wsi->protocol->callback(context, wsi,
-                                   LWS_CALLBACK_HTTP,
-                                   wsi->user_space, uri_ptr, uri_len);
-
-                       /* now drop the header info we kept a pointer to */
-                       if (ah)
-                               free(ah);
-                       /* not possible to continue to use past here */
-                       wsi->u.http.ah = NULL;
-
-                       if (n) {
-                               lwsl_info("LWS_CALLBACK_HTTP closing\n");
-                               goto bail; /* struct ah ptr already nuked */
-                       }
+                               /*
+                                * Hm we still need the headers so the
+                                * callback can look at leaders like the URI, but we
+                                * need to transition to http union state.... hold a
+                                * copy of u.hdr.ah and deallocate afterwards
+                                */
+                               ah = wsi->u.hdr.ah;
+
+                               /* union transition */
+                               memset(&wsi->u, 0, sizeof(wsi->u));
+                               wsi->mode = LWS_CONNMODE_HTTP_SERVING_ACCEPTED;
+                               wsi->state = WSI_STATE_HTTP;
+                               wsi->u.http.fd = -1;
+
+                               /* expose it at the same offset as u.hdr */
+                               wsi->u.http.ah = ah;
+
+                               /* HTTP header had a content length? */
+
+                               wsi->u.http.content_length = 0;
+                               if (lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI))
+                                       wsi->u.http.content_length = 100 * 1024 * 1024;
+
+                               if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH)) {
+                                       lws_hdr_copy(wsi, content_length_str,
+                                                       sizeof(content_length_str) - 1,
+                                                                       WSI_TOKEN_HTTP_CONTENT_LENGTH);
+                                       wsi->u.http.content_length = atoi(content_length_str);
+                               }
 
-                       return 0;
-               }
+                               if (wsi->u.http.content_length > 0) {
+                                       wsi->u.http.body_index = 0;
+                                       wsi->u.http.post_buffer = malloc(wsi->protocol->rx_buffer_size);
+                                       if (!wsi->u.http.post_buffer) {
+                                               lwsl_err("Unable to allocate post buffer\n");
+                                               n = -1;
+                                               goto leave;
+                                       }
+                               }
 
-               if (!wsi->protocol)
-                       lwsl_err("NULL protocol at libwebsocket_read\n");
+                               n = 0;
+                               if (wsi->protocol->callback)
+                                       n = wsi->protocol->callback(context, wsi,
+                                               LWS_CALLBACK_FILTER_HTTP_CONNECTION,
+                                                    wsi->user_space, uri_ptr, uri_len);
+
+                               if (!n && wsi->protocol->callback)
+                                       n = wsi->protocol->callback(context, wsi,
+                                           LWS_CALLBACK_HTTP,
+                                           wsi->user_space, uri_ptr, uri_len);
+
+leave:
+                               /* now drop the header info we kept a pointer to */
+                               if (ah)
+                                       free(ah);
+                               /* not possible to continue to use past here */
+                               wsi->u.http.ah = NULL;
+
+                               if (n) {
+                                       lwsl_info("LWS_CALLBACK_HTTP closing\n");
+                                       goto bail; /* struct ah ptr already nuked */
+                               }
 
-               /*
-                * It's websocket
-                *
-                * Make sure user side is happy about protocol
-                */
+                               /*
+                                * if there is content supposed to be coming,
+                                * put a timeout on it having arrived
+                                */
+                               libwebsocket_set_timeout(wsi,
+                                       PENDING_TIMEOUT_HTTP_CONTENT,
+                                                             AWAITING_TIMEOUT);
+
+                               /*
+                                * deal with anything else as body, whether
+                                * there was a content-length or not
+                                */
+
+                               wsi->state = WSI_STATE_HTTP_BODY;
+                               goto http_postbody;
+                       }
 
-               while (wsi->protocol->callback) {
+                       if (!wsi->protocol)
+                               lwsl_err("NULL protocol at libwebsocket_read\n");
 
-                       if (!lws_hdr_total_length(wsi, WSI_TOKEN_PROTOCOL)) {
-                               if (wsi->protocol->name == NULL)
-                                       break;
-                       } else
-                               if (wsi->protocol->name && strcmp(
-                                       lws_hdr_simple_ptr(wsi,
-                                               WSI_TOKEN_PROTOCOL),
-                                                     wsi->protocol->name) == 0)
-                                       break;
+                       /*
+                        * It's websocket
+                        *
+                        * Make sure user side is happy about protocol
+                        */
 
-                       wsi->protocol++;
-               }
+                       while (wsi->protocol->callback) {
 
-               /* we didn't find a protocol he wanted? */
+                               if (!lws_hdr_total_length(wsi, WSI_TOKEN_PROTOCOL)) {
+                                       if (wsi->protocol->name == NULL)
+                                               break;
+                               } else
+                                       if (wsi->protocol->name && strcmp(
+                                               lws_hdr_simple_ptr(wsi,
+                                                       WSI_TOKEN_PROTOCOL),
+                                                             wsi->protocol->name) == 0)
+                                               break;
 
-               if (wsi->protocol->callback == NULL) {
-                       if (lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL) ==
-                                                                        NULL) {
-                               lwsl_info("no protocol -> prot 0 handler\n");
-                               wsi->protocol = &context->protocols[0];
-                       } else {
-                               lwsl_err("Req protocol %s not supported\n",
-                                  lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL));
-                               goto bail_nuke_ah;
+                               wsi->protocol++;
                        }
-               }
 
-               /* allocate wsi->user storage */
-               if (libwebsocket_ensure_user_space(wsi))
+                       /* we didn't find a protocol he wanted? */
+
+                       if (wsi->protocol->callback == NULL) {
+                               if (lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL) ==
+                                                                                NULL) {
+                                       lwsl_info("no protocol -> prot 0 handler\n");
+                                       wsi->protocol = &context->protocols[0];
+                               } else {
+                                       lwsl_err("Req protocol %s not supported\n",
+                                          lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL));
+                                       goto bail_nuke_ah;
+                               }
+                       }
+
+                       /* allocate wsi->user storage */
+                       if (libwebsocket_ensure_user_space(wsi))
                                goto bail_nuke_ah;
 
-               /*
-                * Give the user code a chance to study the request and
-                * have the opportunity to deny it
-                */
+                       /*
+                        * Give the user code a chance to study the request and
+                        * have the opportunity to deny it
+                        */
 
-               if ((wsi->protocol->callback)(wsi->protocol->owning_server, wsi,
-                               LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION,
-                               wsi->user_space,
-                             lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL), 0)) {
-                       lwsl_warn("User code denied connection\n");
-                       goto bail_nuke_ah;
-               }
+                       if ((wsi->protocol->callback)(wsi->protocol->owning_server, wsi,
+                                       LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION,
+                                       wsi->user_space,
+                                     lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL), 0)) {
+                               lwsl_warn("User code denied connection\n");
+                               goto bail_nuke_ah;
+                       }
 
 
-               /*
-                * Perform the handshake according to the protocol version the
-                * client announced
-                */
+                       /*
+                        * Perform the handshake according to the protocol version the
+                        * client announced
+                        */
 
-               switch (wsi->ietf_spec_revision) {
-               case 13:
-                       lwsl_parser("lws_parse calling handshake_04\n");
-                       if (handshake_0405(context, wsi)) {
-                               lwsl_info("hs0405 has failed the connection\n");
+                       switch (wsi->ietf_spec_revision) {
+                       case 13:
+                               lwsl_parser("lws_parse calling handshake_04\n");
+                               if (handshake_0405(context, wsi)) {
+                                       lwsl_info("hs0405 has failed the connection\n");
+                                       goto bail_nuke_ah;
+                               }
+                               break;
+
+                       default:
+                               lwsl_warn("Unknown client spec version %d\n",
+                                                              wsi->ietf_spec_revision);
                                goto bail_nuke_ah;
                        }
-                       break;
 
-               default:
-                       lwsl_warn("Unknown client spec version %d\n",
-                                                      wsi->ietf_spec_revision);
-                       goto bail_nuke_ah;
-               }
+                       /* drop the header info -- no bail_nuke_ah after this */
 
-               /* drop the header info -- no bail_nuke_ah after this */
+                       if (wsi->u.hdr.ah)
+                               free(wsi->u.hdr.ah);
 
-               if (wsi->u.hdr.ah)
-                       free(wsi->u.hdr.ah);
+                       wsi->mode = LWS_CONNMODE_WS_SERVING;
 
-               wsi->mode = LWS_CONNMODE_WS_SERVING;
-
-               /* union transition */
-               memset(&wsi->u, 0, sizeof(wsi->u));
-               wsi->u.ws.rxflow_change_to = LWS_RXFLOW_ALLOW;
+                       /* union transition */
+                       memset(&wsi->u, 0, sizeof(wsi->u));
+                       wsi->u.ws.rxflow_change_to = LWS_RXFLOW_ALLOW;
 
-               /*
-                * create the frame buffer for this connection according to the
-                * size mentioned in the protocol definition.  If 0 there, use
-                * a big default for compatibility
-                */
+                       /*
+                        * create the frame buffer for this connection according to the
+                        * size mentioned in the protocol definition.  If 0 there, use
+                        * a big default for compatibility
+                        */
 
-               n = wsi->protocol->rx_buffer_size;
-               if (!n)
-                       n = LWS_MAX_SOCKET_IO_BUF;
-               n += LWS_SEND_BUFFER_PRE_PADDING + LWS_SEND_BUFFER_POST_PADDING;
-               wsi->u.ws.rx_user_buffer = malloc(n);
-               if (!wsi->u.ws.rx_user_buffer) {
-                       lwsl_err("Out of Mem allocating rx buffer %d\n", n);
-                       goto bail;
-               }
-               lwsl_info("Allocating RX buffer %d\n", n);
+                       n = wsi->protocol->rx_buffer_size;
+                       if (!n)
+                               n = LWS_MAX_SOCKET_IO_BUF;
+                       n += LWS_SEND_BUFFER_PRE_PADDING + LWS_SEND_BUFFER_POST_PADDING;
+                       wsi->u.ws.rx_user_buffer = malloc(n);
+                       if (!wsi->u.ws.rx_user_buffer) {
+                               lwsl_err("Out of Mem allocating rx buffer %d\n", n);
+                               goto bail;
+                       }
+                       lwsl_info("Allocating RX buffer %d\n", n);
 
-               if (setsockopt(wsi->sock, SOL_SOCKET, SO_SNDBUF,  &n, sizeof n)) {
-                       lwsl_warn("Failed to set SNDBUF to %d", n);
-                       goto bail;
-               }
+                       if (setsockopt(wsi->sock, SOL_SOCKET, SO_SNDBUF,  &n, sizeof n)) {
+                               lwsl_warn("Failed to set SNDBUF to %d", n);
+                               goto bail;
+                       }
 
-               lwsl_parser("accepted v%02d connection\n",
-                                                      wsi->ietf_spec_revision);
+                       lwsl_parser("accepted v%02d connection\n",
+                                                              wsi->ietf_spec_revision);
 #endif
+               } /* while all chars are handled */
                break;
 
        case WSI_STATE_AWAITING_CLOSE_ACK:
index f25102a..7466300 100644 (file)
 /* pos   0: state   0 */    0x67 /* 'g' */, 0x0C  /* (to pos  24 state   1) */,
-                            0x68 /* 'h' */, 0x0F  /* (to pos  32 state   5) */,
-                            0x63 /* 'c' */, 0x14  /* (to pos  44 state  10) */,
-                            0x73 /* 's' */, 0x21  /* (to pos  72 state  21) */,
-                            0x75 /* 'u' */, 0x47  /* (to pos 150 state  51) */,
-                            0x6F /* 'o' */, 0x4E  /* (to pos 166 state  59) */,
-                            0x0D /* '.' */, 0x5A  /* (to pos 192 state  72) */,
-                            0x61 /* 'a' */, 0x8B  /* (to pos 292 state 122) */,
-                            0x69 /* 'i' */, 0x93  /* (to pos 310 state 129) */,
-                            0x70 /* 'p' */, 0xB8  /* (to pos 386 state 166) */,
-                            0x64 /* 'd' */, 0xE7  /* (to pos 482 state 214) */,
-                            0xF2 /* 'r' */, 0xEB  /* (to pos 492 state 219) */,
+                            0x70 /* 'p' */, 0x0F  /* (to pos  32 state   5) */,
+                            0x68 /* 'h' */, 0x14  /* (to pos  44 state  10) */,
+                            0x63 /* 'c' */, 0x19  /* (to pos  56 state  15) */,
+                            0x73 /* 's' */, 0x26  /* (to pos  84 state  26) */,
+                            0x75 /* 'u' */, 0x4C  /* (to pos 162 state  56) */,
+                            0x6F /* 'o' */, 0x53  /* (to pos 178 state  64) */,
+                            0x0D /* '.' */, 0x5F  /* (to pos 204 state  77) */,
+                            0x61 /* 'a' */, 0x90  /* (to pos 304 state 127) */,
+                            0x69 /* 'i' */, 0x98  /* (to pos 322 state 134) */,
+                            0x64 /* 'd' */, 0xF4  /* (to pos 508 state 225) */,
+                            0xF2 /* 'r' */, 0xF8  /* (to pos 518 state 230) */,
 /* pos  24: state   1 */    0xE5 /* 'e' */, 0x01  /* (to pos  26 state   2) */,
 /* pos  26: state   2 */    0xF4 /* 't' */, 0x01  /* (to pos  28 state   3) */,
 /* pos  28: state   3 */    0xA0 /* ' ' */, 0x01  /* (to pos  30 state   4) */,
 /* pos  30: state   4 */    0x80, 0x00            /* - terminal marker  0 - */, 
 /* pos  32: state   5 */    0x6F /* 'o' */, 0x02  /* (to pos  36 state   6) */,
-                            0xF4 /* 't' */, 0x79  /* (to pos 276 state 114) */,
+                            0xF2 /* 'r' */, 0xB6  /* (to pos 398 state 171) */,
 /* pos  36: state   6 */    0xF3 /* 's' */, 0x01  /* (to pos  38 state   7) */,
 /* pos  38: state   7 */    0xF4 /* 't' */, 0x01  /* (to pos  40 state   8) */,
-/* pos  40: state   8 */    0xBA /* ':' */, 0x01  /* (to pos  42 state   9) */,
+/* pos  40: state   8 */    0xA0 /* ' ' */, 0x01  /* (to pos  42 state   9) */,
 /* pos  42: state   9 */    0x81, 0x00            /* - terminal marker  1 - */, 
 /* pos  44: state  10 */    0x6F /* 'o' */, 0x02  /* (to pos  48 state  11) */,
-                            0xE1 /* 'a' */, 0xB1  /* (to pos 400 state 173) */,
-/* pos  48: state  11 */    0x6E /* 'n' */, 0x02  /* (to pos  52 state  12) */,
-                            0xEF /* 'o' */, 0xC9  /* (to pos 452 state 199) */,
-/* pos  52: state  12 */    0x6E /* 'n' */, 0x02  /* (to pos  56 state  13) */,
-                            0xF4 /* 't' */, 0xCC  /* (to pos 462 state 204) */,
-/* pos  56: state  13 */    0xE5 /* 'e' */, 0x01  /* (to pos  58 state  14) */,
-/* pos  58: state  14 */    0xE3 /* 'c' */, 0x01  /* (to pos  60 state  15) */,
-/* pos  60: state  15 */    0xF4 /* 't' */, 0x01  /* (to pos  62 state  16) */,
-/* pos  62: state  16 */    0xE9 /* 'i' */, 0x01  /* (to pos  64 state  17) */,
-/* pos  64: state  17 */    0xEF /* 'o' */, 0x01  /* (to pos  66 state  18) */,
-/* pos  66: state  18 */    0xEE /* 'n' */, 0x01  /* (to pos  68 state  19) */,
-/* pos  68: state  19 */    0xBA /* ':' */, 0x01  /* (to pos  70 state  20) */,
-/* pos  70: state  20 */    0x82, 0x00            /* - terminal marker  2 - */, 
-/* pos  72: state  21 */    0xE5 /* 'e' */, 0x01  /* (to pos  74 state  22) */,
-/* pos  74: state  22 */    0xE3 /* 'c' */, 0x01  /* (to pos  76 state  23) */,
-/* pos  76: state  23 */    0xAD /* '-' */, 0x01  /* (to pos  78 state  24) */,
-/* pos  78: state  24 */    0xF7 /* 'w' */, 0x01  /* (to pos  80 state  25) */,
-/* pos  80: state  25 */    0xE5 /* 'e' */, 0x01  /* (to pos  82 state  26) */,
-/* pos  82: state  26 */    0xE2 /* 'b' */, 0x01  /* (to pos  84 state  27) */,
-/* pos  84: state  27 */    0xF3 /* 's' */, 0x01  /* (to pos  86 state  28) */,
-/* pos  86: state  28 */    0xEF /* 'o' */, 0x01  /* (to pos  88 state  29) */,
-/* pos  88: state  29 */    0xE3 /* 'c' */, 0x01  /* (to pos  90 state  30) */,
-/* pos  90: state  30 */    0xEB /* 'k' */, 0x01  /* (to pos  92 state  31) */,
-/* pos  92: state  31 */    0xE5 /* 'e' */, 0x01  /* (to pos  94 state  32) */,
-/* pos  94: state  32 */    0xF4 /* 't' */, 0x01  /* (to pos  96 state  33) */,
-/* pos  96: state  33 */    0xAD /* '-' */, 0x01  /* (to pos  98 state  34) */,
-/* pos  98: state  34 */    0x6B /* 'k' */, 0x08  /* (to pos 114 state  35) */,
-                            0x70 /* 'p' */, 0x10  /* (to pos 132 state  42) */,
-                            0x64 /* 'd' */, 0x27  /* (to pos 180 state  66) */,
-                            0x76 /* 'v' */, 0x2F  /* (to pos 198 state  75) */,
-                            0x6F /* 'o' */, 0x36  /* (to pos 214 state  83) */,
-                            0x65 /* 'e' */, 0x3C  /* (to pos 228 state  90) */,
-                            0x61 /* 'a' */, 0x46  /* (to pos 250 state 101) */,
-                            0xEE /* 'n' */, 0x4C  /* (to pos 264 state 108) */,
-/* pos 114: state  35 */    0xE5 /* 'e' */, 0x01  /* (to pos 116 state  36) */,
-/* pos 116: state  36 */    0xF9 /* 'y' */, 0x01  /* (to pos 118 state  37) */,
-/* pos 118: state  37 */    0x31 /* '1' */, 0x03  /* (to pos 124 state  38) */,
-                            0x32 /* '2' */, 0x04  /* (to pos 128 state  40) */,
-                            0xBA /* ':' */, 0x25  /* (to pos 196 state  74) */,
-/* pos 124: state  38 */    0xBA /* ':' */, 0x01  /* (to pos 126 state  39) */,
-/* pos 126: state  39 */    0x83, 0x00            /* - terminal marker  3 - */, 
-/* pos 128: state  40 */    0xBA /* ':' */, 0x01  /* (to pos 130 state  41) */,
-/* pos 130: state  41 */    0x84, 0x00            /* - terminal marker  4 - */, 
-/* pos 132: state  42 */    0xF2 /* 'r' */, 0x01  /* (to pos 134 state  43) */,
-/* pos 134: state  43 */    0xEF /* 'o' */, 0x01  /* (to pos 136 state  44) */,
-/* pos 136: state  44 */    0xF4 /* 't' */, 0x01  /* (to pos 138 state  45) */,
-/* pos 138: state  45 */    0xEF /* 'o' */, 0x01  /* (to pos 140 state  46) */,
-/* pos 140: state  46 */    0xE3 /* 'c' */, 0x01  /* (to pos 142 state  47) */,
-/* pos 142: state  47 */    0xEF /* 'o' */, 0x01  /* (to pos 144 state  48) */,
-/* pos 144: state  48 */    0xEC /* 'l' */, 0x01  /* (to pos 146 state  49) */,
-/* pos 146: state  49 */    0xBA /* ':' */, 0x01  /* (to pos 148 state  50) */,
-/* pos 148: state  50 */    0x85, 0x00            /* - terminal marker  5 - */, 
-/* pos 150: state  51 */    0xF0 /* 'p' */, 0x01  /* (to pos 152 state  52) */,
-/* pos 152: state  52 */    0xE7 /* 'g' */, 0x01  /* (to pos 154 state  53) */,
-/* pos 154: state  53 */    0xF2 /* 'r' */, 0x01  /* (to pos 156 state  54) */,
-/* pos 156: state  54 */    0xE1 /* 'a' */, 0x01  /* (to pos 158 state  55) */,
-/* pos 158: state  55 */    0xE4 /* 'd' */, 0x01  /* (to pos 160 state  56) */,
-/* pos 160: state  56 */    0xE5 /* 'e' */, 0x01  /* (to pos 162 state  57) */,
-/* pos 162: state  57 */    0xBA /* ':' */, 0x01  /* (to pos 164 state  58) */,
-/* pos 164: state  58 */    0x86, 0x00            /* - terminal marker  6 - */, 
-/* pos 166: state  59 */    0xF2 /* 'r' */, 0x01  /* (to pos 168 state  60) */,
-/* pos 168: state  60 */    0xE9 /* 'i' */, 0x01  /* (to pos 170 state  61) */,
-/* pos 170: state  61 */    0xE7 /* 'g' */, 0x01  /* (to pos 172 state  62) */,
-/* pos 172: state  62 */    0xE9 /* 'i' */, 0x01  /* (to pos 174 state  63) */,
-/* pos 174: state  63 */    0xEE /* 'n' */, 0x01  /* (to pos 176 state  64) */,
-/* pos 176: state  64 */    0xBA /* ':' */, 0x01  /* (to pos 178 state  65) */,
-/* pos 178: state  65 */    0x87, 0x00            /* - terminal marker  7 - */, 
-/* pos 180: state  66 */    0xF2 /* 'r' */, 0x01  /* (to pos 182 state  67) */,
-/* pos 182: state  67 */    0xE1 /* 'a' */, 0x01  /* (to pos 184 state  68) */,
-/* pos 184: state  68 */    0xE6 /* 'f' */, 0x01  /* (to pos 186 state  69) */,
-/* pos 186: state  69 */    0xF4 /* 't' */, 0x01  /* (to pos 188 state  70) */,
-/* pos 188: state  70 */    0xBA /* ':' */, 0x01  /* (to pos 190 state  71) */,
-/* pos 190: state  71 */    0x88, 0x00            /* - terminal marker  8 - */, 
-/* pos 192: state  72 */    0x8A /* '.' */, 0x01  /* (to pos 194 state  73) */,
-/* pos 194: state  73 */    0x89, 0x00            /* - terminal marker  9 - */, 
-/* pos 196: state  74 */    0x8A, 0x00            /* - terminal marker 10 - */, 
-/* pos 198: state  75 */    0xE5 /* 'e' */, 0x01  /* (to pos 200 state  76) */,
-/* pos 200: state  76 */    0xF2 /* 'r' */, 0x01  /* (to pos 202 state  77) */,
-/* pos 202: state  77 */    0xF3 /* 's' */, 0x01  /* (to pos 204 state  78) */,
-/* pos 204: state  78 */    0xE9 /* 'i' */, 0x01  /* (to pos 206 state  79) */,
-/* pos 206: state  79 */    0xEF /* 'o' */, 0x01  /* (to pos 208 state  80) */,
-/* pos 208: state  80 */    0xEE /* 'n' */, 0x01  /* (to pos 210 state  81) */,
-/* pos 210: state  81 */    0xBA /* ':' */, 0x01  /* (to pos 212 state  82) */,
-/* pos 212: state  82 */    0x8B, 0x00            /* - terminal marker 11 - */, 
-/* pos 214: state  83 */    0xF2 /* 'r' */, 0x01  /* (to pos 216 state  84) */,
-/* pos 216: state  84 */    0xE9 /* 'i' */, 0x01  /* (to pos 218 state  85) */,
-/* pos 218: state  85 */    0xE7 /* 'g' */, 0x01  /* (to pos 220 state  86) */,
-/* pos 220: state  86 */    0xE9 /* 'i' */, 0x01  /* (to pos 222 state  87) */,
-/* pos 222: state  87 */    0xEE /* 'n' */, 0x01  /* (to pos 224 state  88) */,
-/* pos 224: state  88 */    0xBA /* ':' */, 0x01  /* (to pos 226 state  89) */,
-/* pos 226: state  89 */    0x8C, 0x00            /* - terminal marker 12 - */, 
-/* pos 228: state  90 */    0xF8 /* 'x' */, 0x01  /* (to pos 230 state  91) */,
-/* pos 230: state  91 */    0xF4 /* 't' */, 0x01  /* (to pos 232 state  92) */,
-/* pos 232: state  92 */    0xE5 /* 'e' */, 0x01  /* (to pos 234 state  93) */,
-/* pos 234: state  93 */    0xEE /* 'n' */, 0x01  /* (to pos 236 state  94) */,
-/* pos 236: state  94 */    0xF3 /* 's' */, 0x01  /* (to pos 238 state  95) */,
-/* pos 238: state  95 */    0xE9 /* 'i' */, 0x01  /* (to pos 240 state  96) */,
-/* pos 240: state  96 */    0xEF /* 'o' */, 0x01  /* (to pos 242 state  97) */,
-/* pos 242: state  97 */    0xEE /* 'n' */, 0x01  /* (to pos 244 state  98) */,
-/* pos 244: state  98 */    0xF3 /* 's' */, 0x01  /* (to pos 246 state  99) */,
-/* pos 246: state  99 */    0xBA /* ':' */, 0x01  /* (to pos 248 state 100) */,
-/* pos 248: state 100 */    0x8D, 0x00            /* - terminal marker 13 - */, 
-/* pos 250: state 101 */    0xE3 /* 'c' */, 0x01  /* (to pos 252 state 102) */,
-/* pos 252: state 102 */    0xE3 /* 'c' */, 0x01  /* (to pos 254 state 103) */,
-/* pos 254: state 103 */    0xE5 /* 'e' */, 0x01  /* (to pos 256 state 104) */,
-/* pos 256: state 104 */    0xF0 /* 'p' */, 0x01  /* (to pos 258 state 105) */,
-/* pos 258: state 105 */    0xF4 /* 't' */, 0x01  /* (to pos 260 state 106) */,
-/* pos 260: state 106 */    0xBA /* ':' */, 0x01  /* (to pos 262 state 107) */,
-/* pos 262: state 107 */    0x8E, 0x00            /* - terminal marker 14 - */, 
-/* pos 264: state 108 */    0xEF /* 'o' */, 0x01  /* (to pos 266 state 109) */,
-/* pos 266: state 109 */    0xEE /* 'n' */, 0x01  /* (to pos 268 state 110) */,
-/* pos 268: state 110 */    0xE3 /* 'c' */, 0x01  /* (to pos 270 state 111) */,
-/* pos 270: state 111 */    0xE5 /* 'e' */, 0x01  /* (to pos 272 state 112) */,
-/* pos 272: state 112 */    0xBA /* ':' */, 0x01  /* (to pos 274 state 113) */,
-/* pos 274: state 113 */    0x8F, 0x00            /* - terminal marker 15 - */, 
-/* pos 276: state 114 */    0xF4 /* 't' */, 0x01  /* (to pos 278 state 115) */,
-/* pos 278: state 115 */    0xF0 /* 'p' */, 0x01  /* (to pos 280 state 116) */,
-/* pos 280: state 116 */    0xAF /* '/' */, 0x01  /* (to pos 282 state 117) */,
-/* pos 282: state 117 */    0xB1 /* '1' */, 0x01  /* (to pos 284 state 118) */,
-/* pos 284: state 118 */    0xAE /* '.' */, 0x01  /* (to pos 286 state 119) */,
-/* pos 286: state 119 */    0xB1 /* '1' */, 0x01  /* (to pos 288 state 120) */,
-/* pos 288: state 120 */    0xA0 /* ' ' */, 0x01  /* (to pos 290 state 121) */,
-/* pos 290: state 121 */    0x90, 0x00            /* - terminal marker 16 - */, 
-/* pos 292: state 122 */    0x63 /* 'c' */, 0x02  /* (to pos 296 state 123) */,
-                            0xF5 /* 'u' */, 0x42  /* (to pos 426 state 186) */,
-/* pos 296: state 123 */    0xE3 /* 'c' */, 0x01  /* (to pos 298 state 124) */,
-/* pos 298: state 124 */    0xE5 /* 'e' */, 0x01  /* (to pos 300 state 125) */,
-/* pos 300: state 125 */    0xF0 /* 'p' */, 0x01  /* (to pos 302 state 126) */,
-/* pos 302: state 126 */    0xF4 /* 't' */, 0x01  /* (to pos 304 state 127) */,
-/* pos 304: state 127 */    0x3A /* ':' */, 0x02  /* (to pos 308 state 128) */,
-                            0xAD /* '-' */, 0x14  /* (to pos 346 state 147) */,
-/* pos 308: state 128 */    0x91, 0x00            /* - terminal marker 17 - */, 
-/* pos 310: state 129 */    0xE6 /* 'f' */, 0x01  /* (to pos 312 state 130) */,
-/* pos 312: state 130 */    0xAD /* '-' */, 0x01  /* (to pos 314 state 131) */,
-/* pos 314: state 131 */    0xED /* 'm' */, 0x01  /* (to pos 316 state 132) */,
-/* pos 316: state 132 */    0xEF /* 'o' */, 0x01  /* (to pos 318 state 133) */,
-/* pos 318: state 133 */    0xE4 /* 'd' */, 0x01  /* (to pos 320 state 134) */,
-/* pos 320: state 134 */    0xE9 /* 'i' */, 0x01  /* (to pos 322 state 135) */,
-/* pos 322: state 135 */    0xE6 /* 'f' */, 0x01  /* (to pos 324 state 136) */,
-/* pos 324: state 136 */    0xE9 /* 'i' */, 0x01  /* (to pos 326 state 137) */,
-/* pos 326: state 137 */    0xE5 /* 'e' */, 0x01  /* (to pos 328 state 138) */,
-/* pos 328: state 138 */    0xE4 /* 'd' */, 0x01  /* (to pos 330 state 139) */,
-/* pos 330: state 139 */    0xAD /* '-' */, 0x01  /* (to pos 332 state 140) */,
-/* pos 332: state 140 */    0xF3 /* 's' */, 0x01  /* (to pos 334 state 141) */,
-/* pos 334: state 141 */    0xE9 /* 'i' */, 0x01  /* (to pos 336 state 142) */,
-/* pos 336: state 142 */    0xEE /* 'n' */, 0x01  /* (to pos 338 state 143) */,
-/* pos 338: state 143 */    0xE3 /* 'c' */, 0x01  /* (to pos 340 state 144) */,
-/* pos 340: state 144 */    0xE5 /* 'e' */, 0x01  /* (to pos 342 state 145) */,
-/* pos 342: state 145 */    0xBA /* ':' */, 0x01  /* (to pos 344 state 146) */,
-/* pos 344: state 146 */    0x92, 0x00            /* - terminal marker 18 - */, 
-/* pos 346: state 147 */    0x65 /* 'e' */, 0x02  /* (to pos 350 state 148) */,
-                            0xEC /* 'l' */, 0x0A  /* (to pos 368 state 157) */,
-/* pos 350: state 148 */    0xEE /* 'n' */, 0x01  /* (to pos 352 state 149) */,
-/* pos 352: state 149 */    0xE3 /* 'c' */, 0x01  /* (to pos 354 state 150) */,
-/* pos 354: state 150 */    0xEF /* 'o' */, 0x01  /* (to pos 356 state 151) */,
-/* pos 356: state 151 */    0xE4 /* 'd' */, 0x01  /* (to pos 358 state 152) */,
-/* pos 358: state 152 */    0xE9 /* 'i' */, 0x01  /* (to pos 360 state 153) */,
-/* pos 360: state 153 */    0xEE /* 'n' */, 0x01  /* (to pos 362 state 154) */,
-/* pos 362: state 154 */    0xE7 /* 'g' */, 0x01  /* (to pos 364 state 155) */,
-/* pos 364: state 155 */    0xBA /* ':' */, 0x01  /* (to pos 366 state 156) */,
-/* pos 366: state 156 */    0x93, 0x00            /* - terminal marker 19 - */, 
-/* pos 368: state 157 */    0xE1 /* 'a' */, 0x01  /* (to pos 370 state 158) */,
-/* pos 370: state 158 */    0xEE /* 'n' */, 0x01  /* (to pos 372 state 159) */,
-/* pos 372: state 159 */    0xE7 /* 'g' */, 0x01  /* (to pos 374 state 160) */,
-/* pos 374: state 160 */    0xF5 /* 'u' */, 0x01  /* (to pos 376 state 161) */,
-/* pos 376: state 161 */    0xE1 /* 'a' */, 0x01  /* (to pos 378 state 162) */,
-/* pos 378: state 162 */    0xE7 /* 'g' */, 0x01  /* (to pos 380 state 163) */,
-/* pos 380: state 163 */    0xE5 /* 'e' */, 0x01  /* (to pos 382 state 164) */,
-/* pos 382: state 164 */    0xBA /* ':' */, 0x01  /* (to pos 384 state 165) */,
-/* pos 384: state 165 */    0x94, 0x00            /* - terminal marker 20 - */, 
-/* pos 386: state 166 */    0xF2 /* 'r' */, 0x01  /* (to pos 388 state 167) */,
-/* pos 388: state 167 */    0xE1 /* 'a' */, 0x01  /* (to pos 390 state 168) */,
-/* pos 390: state 168 */    0xE7 /* 'g' */, 0x01  /* (to pos 392 state 169) */,
-/* pos 392: state 169 */    0xED /* 'm' */, 0x01  /* (to pos 394 state 170) */,
-/* pos 394: state 170 */    0xE1 /* 'a' */, 0x01  /* (to pos 396 state 171) */,
-/* pos 396: state 171 */    0xBA /* ':' */, 0x01  /* (to pos 398 state 172) */,
-/* pos 398: state 172 */    0x95, 0x00            /* - terminal marker 21 - */, 
-/* pos 400: state 173 */    0xE3 /* 'c' */, 0x01  /* (to pos 402 state 174) */,
-/* pos 402: state 174 */    0xE8 /* 'h' */, 0x01  /* (to pos 404 state 175) */,
-/* pos 404: state 175 */    0xE5 /* 'e' */, 0x01  /* (to pos 406 state 176) */,
-/* pos 406: state 176 */    0xAD /* '-' */, 0x01  /* (to pos 408 state 177) */,
-/* pos 408: state 177 */    0xE3 /* 'c' */, 0x01  /* (to pos 410 state 178) */,
-/* pos 410: state 178 */    0xEF /* 'o' */, 0x01  /* (to pos 412 state 179) */,
-/* pos 412: state 179 */    0xEE /* 'n' */, 0x01  /* (to pos 414 state 180) */,
-/* pos 414: state 180 */    0xF4 /* 't' */, 0x01  /* (to pos 416 state 181) */,
-/* pos 416: state 181 */    0xF2 /* 'r' */, 0x01  /* (to pos 418 state 182) */,
-/* pos 418: state 182 */    0xEF /* 'o' */, 0x01  /* (to pos 420 state 183) */,
-/* pos 420: state 183 */    0xEC /* 'l' */, 0x01  /* (to pos 422 state 184) */,
-/* pos 422: state 184 */    0xBA /* ':' */, 0x01  /* (to pos 424 state 185) */,
-/* pos 424: state 185 */    0x96, 0x00            /* - terminal marker 22 - */, 
-/* pos 426: state 186 */    0xF4 /* 't' */, 0x01  /* (to pos 428 state 187) */,
-/* pos 428: state 187 */    0xE8 /* 'h' */, 0x01  /* (to pos 430 state 188) */,
-/* pos 430: state 188 */    0xEF /* 'o' */, 0x01  /* (to pos 432 state 189) */,
-/* pos 432: state 189 */    0xF2 /* 'r' */, 0x01  /* (to pos 434 state 190) */,
-/* pos 434: state 190 */    0xE9 /* 'i' */, 0x01  /* (to pos 436 state 191) */,
-/* pos 436: state 191 */    0xFA /* 'z' */, 0x01  /* (to pos 438 state 192) */,
-/* pos 438: state 192 */    0xE1 /* 'a' */, 0x01  /* (to pos 440 state 193) */,
-/* pos 440: state 193 */    0xF4 /* 't' */, 0x01  /* (to pos 442 state 194) */,
-/* pos 442: state 194 */    0xE9 /* 'i' */, 0x01  /* (to pos 444 state 195) */,
-/* pos 444: state 195 */    0xEF /* 'o' */, 0x01  /* (to pos 446 state 196) */,
-/* pos 446: state 196 */    0xEE /* 'n' */, 0x01  /* (to pos 448 state 197) */,
-/* pos 448: state 197 */    0xBA /* ':' */, 0x01  /* (to pos 450 state 198) */,
-/* pos 450: state 198 */    0x97, 0x00            /* - terminal marker 23 - */, 
-/* pos 452: state 199 */    0xEB /* 'k' */, 0x01  /* (to pos 454 state 200) */,
-/* pos 454: state 200 */    0xE9 /* 'i' */, 0x01  /* (to pos 456 state 201) */,
-/* pos 456: state 201 */    0xE5 /* 'e' */, 0x01  /* (to pos 458 state 202) */,
-/* pos 458: state 202 */    0xBA /* ':' */, 0x01  /* (to pos 460 state 203) */,
-/* pos 460: state 203 */    0x98, 0x00            /* - terminal marker 24 - */, 
-/* pos 462: state 204 */    0xE5 /* 'e' */, 0x01  /* (to pos 464 state 205) */,
-/* pos 464: state 205 */    0xEE /* 'n' */, 0x01  /* (to pos 466 state 206) */,
-/* pos 466: state 206 */    0xF4 /* 't' */, 0x01  /* (to pos 468 state 207) */,
-/* pos 468: state 207 */    0xAD /* '-' */, 0x01  /* (to pos 470 state 208) */,
-/* pos 470: state 208 */    0xF4 /* 't' */, 0x01  /* (to pos 472 state 209) */,
-/* pos 472: state 209 */    0xF9 /* 'y' */, 0x01  /* (to pos 474 state 210) */,
-/* pos 474: state 210 */    0xF0 /* 'p' */, 0x01  /* (to pos 476 state 211) */,
-/* pos 476: state 211 */    0xE5 /* 'e' */, 0x01  /* (to pos 478 state 212) */,
-/* pos 478: state 212 */    0xBA /* ':' */, 0x01  /* (to pos 480 state 213) */,
-/* pos 480: state 213 */    0x99, 0x00            /* - terminal marker 25 - */, 
-/* pos 482: state 214 */    0xE1 /* 'a' */, 0x01  /* (to pos 484 state 215) */,
-/* pos 484: state 215 */    0xF4 /* 't' */, 0x01  /* (to pos 486 state 216) */,
-/* pos 486: state 216 */    0xE5 /* 'e' */, 0x01  /* (to pos 488 state 217) */,
-/* pos 488: state 217 */    0xBA /* ':' */, 0x01  /* (to pos 490 state 218) */,
-/* pos 490: state 218 */    0x9A, 0x00            /* - terminal marker 26 - */, 
-/* pos 492: state 219 */    0x61 /* 'a' */, 0x02  /* (to pos 496 state 220) */,
-                            0xE5 /* 'e' */, 0x06  /* (to pos 506 state 225) */,
-/* pos 496: state 220 */    0xEE /* 'n' */, 0x01  /* (to pos 498 state 221) */,
-/* pos 498: state 221 */    0xE7 /* 'g' */, 0x01  /* (to pos 500 state 222) */,
-/* pos 500: state 222 */    0xE5 /* 'e' */, 0x01  /* (to pos 502 state 223) */,
-/* pos 502: state 223 */    0xBA /* ':' */, 0x01  /* (to pos 504 state 224) */,
-/* pos 504: state 224 */    0x9B, 0x00            /* - terminal marker 27 - */, 
-/* pos 506: state 225 */    0xE6 /* 'f' */, 0x01  /* (to pos 508 state 226) */,
-/* pos 508: state 226 */    0xE5 /* 'e' */, 0x01  /* (to pos 510 state 227) */,
-/* pos 510: state 227 */    0xF2 /* 'r' */, 0x01  /* (to pos 512 state 228) */,
-/* pos 512: state 228 */    0xE5 /* 'e' */, 0x01  /* (to pos 514 state 229) */,
-/* pos 514: state 229 */    0xF2 /* 'r' */, 0x01  /* (to pos 516 state 230) */,
-/* pos 516: state 230 */    0xBA /* ':' */, 0x01  /* (to pos 518 state 231) */,
-/* pos 518: state 231 */    0x9C, 0x00            /* - terminal marker 28 - */, 
-/* total size 520 bytes */
+                            0xF4 /* 't' */, 0x79  /* (to pos 288 state 119) */,
+/* pos  48: state  11 */    0xF3 /* 's' */, 0x01  /* (to pos  50 state  12) */,
+/* pos  50: state  12 */    0xF4 /* 't' */, 0x01  /* (to pos  52 state  13) */,
+/* pos  52: state  13 */    0xBA /* ':' */, 0x01  /* (to pos  54 state  14) */,
+/* pos  54: state  14 */    0x82, 0x00            /* - terminal marker  2 - */, 
+/* pos  56: state  15 */    0x6F /* 'o' */, 0x02  /* (to pos  60 state  16) */,
+                            0xE1 /* 'a' */, 0xB0  /* (to pos 410 state 177) */,
+/* pos  60: state  16 */    0x6E /* 'n' */, 0x02  /* (to pos  64 state  17) */,
+                            0xEF /* 'o' */, 0xC8  /* (to pos 462 state 203) */,
+/* pos  64: state  17 */    0x6E /* 'n' */, 0x02  /* (to pos  68 state  18) */,
+                            0xF4 /* 't' */, 0xCB  /* (to pos 472 state 208) */,
+/* pos  68: state  18 */    0xE5 /* 'e' */, 0x01  /* (to pos  70 state  19) */,
+/* pos  70: state  19 */    0xE3 /* 'c' */, 0x01  /* (to pos  72 state  20) */,
+/* pos  72: state  20 */    0xF4 /* 't' */, 0x01  /* (to pos  74 state  21) */,
+/* pos  74: state  21 */    0xE9 /* 'i' */, 0x01  /* (to pos  76 state  22) */,
+/* pos  76: state  22 */    0xEF /* 'o' */, 0x01  /* (to pos  78 state  23) */,
+/* pos  78: state  23 */    0xEE /* 'n' */, 0x01  /* (to pos  80 state  24) */,
+/* pos  80: state  24 */    0xBA /* ':' */, 0x01  /* (to pos  82 state  25) */,
+/* pos  82: state  25 */    0x83, 0x00            /* - terminal marker  3 - */, 
+/* pos  84: state  26 */    0xE5 /* 'e' */, 0x01  /* (to pos  86 state  27) */,
+/* pos  86: state  27 */    0xE3 /* 'c' */, 0x01  /* (to pos  88 state  28) */,
+/* pos  88: state  28 */    0xAD /* '-' */, 0x01  /* (to pos  90 state  29) */,
+/* pos  90: state  29 */    0xF7 /* 'w' */, 0x01  /* (to pos  92 state  30) */,
+/* pos  92: state  30 */    0xE5 /* 'e' */, 0x01  /* (to pos  94 state  31) */,
+/* pos  94: state  31 */    0xE2 /* 'b' */, 0x01  /* (to pos  96 state  32) */,
+/* pos  96: state  32 */    0xF3 /* 's' */, 0x01  /* (to pos  98 state  33) */,
+/* pos  98: state  33 */    0xEF /* 'o' */, 0x01  /* (to pos 100 state  34) */,
+/* pos 100: state  34 */    0xE3 /* 'c' */, 0x01  /* (to pos 102 state  35) */,
+/* pos 102: state  35 */    0xEB /* 'k' */, 0x01  /* (to pos 104 state  36) */,
+/* pos 104: state  36 */    0xE5 /* 'e' */, 0x01  /* (to pos 106 state  37) */,
+/* pos 106: state  37 */    0xF4 /* 't' */, 0x01  /* (to pos 108 state  38) */,
+/* pos 108: state  38 */    0xAD /* '-' */, 0x01  /* (to pos 110 state  39) */,
+/* pos 110: state  39 */    0x6B /* 'k' */, 0x08  /* (to pos 126 state  40) */,
+                            0x70 /* 'p' */, 0x10  /* (to pos 144 state  47) */,
+                            0x64 /* 'd' */, 0x27  /* (to pos 192 state  71) */,
+                            0x76 /* 'v' */, 0x2F  /* (to pos 210 state  80) */,
+                            0x6F /* 'o' */, 0x36  /* (to pos 226 state  88) */,
+                            0x65 /* 'e' */, 0x3C  /* (to pos 240 state  95) */,
+                            0x61 /* 'a' */, 0x46  /* (to pos 262 state 106) */,
+                            0xEE /* 'n' */, 0x4C  /* (to pos 276 state 113) */,
+/* pos 126: state  40 */    0xE5 /* 'e' */, 0x01  /* (to pos 128 state  41) */,
+/* pos 128: state  41 */    0xF9 /* 'y' */, 0x01  /* (to pos 130 state  42) */,
+/* pos 130: state  42 */    0x31 /* '1' */, 0x03  /* (to pos 136 state  43) */,
+                            0x32 /* '2' */, 0x04  /* (to pos 140 state  45) */,
+                            0xBA /* ':' */, 0x25  /* (to pos 208 state  79) */,
+/* pos 136: state  43 */    0xBA /* ':' */, 0x01  /* (to pos 138 state  44) */,
+/* pos 138: state  44 */    0x84, 0x00            /* - terminal marker  4 - */, 
+/* pos 140: state  45 */    0xBA /* ':' */, 0x01  /* (to pos 142 state  46) */,
+/* pos 142: state  46 */    0x85, 0x00            /* - terminal marker  5 - */, 
+/* pos 144: state  47 */    0xF2 /* 'r' */, 0x01  /* (to pos 146 state  48) */,
+/* pos 146: state  48 */    0xEF /* 'o' */, 0x01  /* (to pos 148 state  49) */,
+/* pos 148: state  49 */    0xF4 /* 't' */, 0x01  /* (to pos 150 state  50) */,
+/* pos 150: state  50 */    0xEF /* 'o' */, 0x01  /* (to pos 152 state  51) */,
+/* pos 152: state  51 */    0xE3 /* 'c' */, 0x01  /* (to pos 154 state  52) */,
+/* pos 154: state  52 */    0xEF /* 'o' */, 0x01  /* (to pos 156 state  53) */,
+/* pos 156: state  53 */    0xEC /* 'l' */, 0x01  /* (to pos 158 state  54) */,
+/* pos 158: state  54 */    0xBA /* ':' */, 0x01  /* (to pos 160 state  55) */,
+/* pos 160: state  55 */    0x86, 0x00            /* - terminal marker  6 - */, 
+/* pos 162: state  56 */    0xF0 /* 'p' */, 0x01  /* (to pos 164 state  57) */,
+/* pos 164: state  57 */    0xE7 /* 'g' */, 0x01  /* (to pos 166 state  58) */,
+/* pos 166: state  58 */    0xF2 /* 'r' */, 0x01  /* (to pos 168 state  59) */,
+/* pos 168: state  59 */    0xE1 /* 'a' */, 0x01  /* (to pos 170 state  60) */,
+/* pos 170: state  60 */    0xE4 /* 'd' */, 0x01  /* (to pos 172 state  61) */,
+/* pos 172: state  61 */    0xE5 /* 'e' */, 0x01  /* (to pos 174 state  62) */,
+/* pos 174: state  62 */    0xBA /* ':' */, 0x01  /* (to pos 176 state  63) */,
+/* pos 176: state  63 */    0x87, 0x00            /* - terminal marker  7 - */, 
+/* pos 178: state  64 */    0xF2 /* 'r' */, 0x01  /* (to pos 180 state  65) */,
+/* pos 180: state  65 */    0xE9 /* 'i' */, 0x01  /* (to pos 182 state  66) */,
+/* pos 182: state  66 */    0xE7 /* 'g' */, 0x01  /* (to pos 184 state  67) */,
+/* pos 184: state  67 */    0xE9 /* 'i' */, 0x01  /* (to pos 186 state  68) */,
+/* pos 186: state  68 */    0xEE /* 'n' */, 0x01  /* (to pos 188 state  69) */,
+/* pos 188: state  69 */    0xBA /* ':' */, 0x01  /* (to pos 190 state  70) */,
+/* pos 190: state  70 */    0x88, 0x00            /* - terminal marker  8 - */, 
+/* pos 192: state  71 */    0xF2 /* 'r' */, 0x01  /* (to pos 194 state  72) */,
+/* pos 194: state  72 */    0xE1 /* 'a' */, 0x01  /* (to pos 196 state  73) */,
+/* pos 196: state  73 */    0xE6 /* 'f' */, 0x01  /* (to pos 198 state  74) */,
+/* pos 198: state  74 */    0xF4 /* 't' */, 0x01  /* (to pos 200 state  75) */,
+/* pos 200: state  75 */    0xBA /* ':' */, 0x01  /* (to pos 202 state  76) */,
+/* pos 202: state  76 */    0x89, 0x00            /* - terminal marker  9 - */, 
+/* pos 204: state  77 */    0x8A /* '.' */, 0x01  /* (to pos 206 state  78) */,
+/* pos 206: state  78 */    0x8A, 0x00            /* - terminal marker 10 - */, 
+/* pos 208: state  79 */    0x8B, 0x00            /* - terminal marker 11 - */, 
+/* pos 210: state  80 */    0xE5 /* 'e' */, 0x01  /* (to pos 212 state  81) */,
+/* pos 212: state  81 */    0xF2 /* 'r' */, 0x01  /* (to pos 214 state  82) */,
+/* pos 214: state  82 */    0xF3 /* 's' */, 0x01  /* (to pos 216 state  83) */,
+/* pos 216: state  83 */    0xE9 /* 'i' */, 0x01  /* (to pos 218 state  84) */,
+/* pos 218: state  84 */    0xEF /* 'o' */, 0x01  /* (to pos 220 state  85) */,
+/* pos 220: state  85 */    0xEE /* 'n' */, 0x01  /* (to pos 222 state  86) */,
+/* pos 222: state  86 */    0xBA /* ':' */, 0x01  /* (to pos 224 state  87) */,
+/* pos 224: state  87 */    0x8C, 0x00            /* - terminal marker 12 - */, 
+/* pos 226: state  88 */    0xF2 /* 'r' */, 0x01  /* (to pos 228 state  89) */,
+/* pos 228: state  89 */    0xE9 /* 'i' */, 0x01  /* (to pos 230 state  90) */,
+/* pos 230: state  90 */    0xE7 /* 'g' */, 0x01  /* (to pos 232 state  91) */,
+/* pos 232: state  91 */    0xE9 /* 'i' */, 0x01  /* (to pos 234 state  92) */,
+/* pos 234: state  92 */    0xEE /* 'n' */, 0x01  /* (to pos 236 state  93) */,
+/* pos 236: state  93 */    0xBA /* ':' */, 0x01  /* (to pos 238 state  94) */,
+/* pos 238: state  94 */    0x8D, 0x00            /* - terminal marker 13 - */, 
+/* pos 240: state  95 */    0xF8 /* 'x' */, 0x01  /* (to pos 242 state  96) */,
+/* pos 242: state  96 */    0xF4 /* 't' */, 0x01  /* (to pos 244 state  97) */,
+/* pos 244: state  97 */    0xE5 /* 'e' */, 0x01  /* (to pos 246 state  98) */,
+/* pos 246: state  98 */    0xEE /* 'n' */, 0x01  /* (to pos 248 state  99) */,
+/* pos 248: state  99 */    0xF3 /* 's' */, 0x01  /* (to pos 250 state 100) */,
+/* pos 250: state 100 */    0xE9 /* 'i' */, 0x01  /* (to pos 252 state 101) */,
+/* pos 252: state 101 */    0xEF /* 'o' */, 0x01  /* (to pos 254 state 102) */,
+/* pos 254: state 102 */    0xEE /* 'n' */, 0x01  /* (to pos 256 state 103) */,
+/* pos 256: state 103 */    0xF3 /* 's' */, 0x01  /* (to pos 258 state 104) */,
+/* pos 258: state 104 */    0xBA /* ':' */, 0x01  /* (to pos 260 state 105) */,
+/* pos 260: state 105 */    0x8E, 0x00            /* - terminal marker 14 - */, 
+/* pos 262: state 106 */    0xE3 /* 'c' */, 0x01  /* (to pos 264 state 107) */,
+/* pos 264: state 107 */    0xE3 /* 'c' */, 0x01  /* (to pos 266 state 108) */,
+/* pos 266: state 108 */    0xE5 /* 'e' */, 0x01  /* (to pos 268 state 109) */,
+/* pos 268: state 109 */    0xF0 /* 'p' */, 0x01  /* (to pos 270 state 110) */,
+/* pos 270: state 110 */    0xF4 /* 't' */, 0x01  /* (to pos 272 state 111) */,
+/* pos 272: state 111 */    0xBA /* ':' */, 0x01  /* (to pos 274 state 112) */,
+/* pos 274: state 112 */    0x8F, 0x00            /* - terminal marker 15 - */, 
+/* pos 276: state 113 */    0xEF /* 'o' */, 0x01  /* (to pos 278 state 114) */,
+/* pos 278: state 114 */    0xEE /* 'n' */, 0x01  /* (to pos 280 state 115) */,
+/* pos 280: state 115 */    0xE3 /* 'c' */, 0x01  /* (to pos 282 state 116) */,
+/* pos 282: state 116 */    0xE5 /* 'e' */, 0x01  /* (to pos 284 state 117) */,
+/* pos 284: state 117 */    0xBA /* ':' */, 0x01  /* (to pos 286 state 118) */,
+/* pos 286: state 118 */    0x90, 0x00            /* - terminal marker 16 - */, 
+/* pos 288: state 119 */    0xF4 /* 't' */, 0x01  /* (to pos 290 state 120) */,
+/* pos 290: state 120 */    0xF0 /* 'p' */, 0x01  /* (to pos 292 state 121) */,
+/* pos 292: state 121 */    0xAF /* '/' */, 0x01  /* (to pos 294 state 122) */,
+/* pos 294: state 122 */    0xB1 /* '1' */, 0x01  /* (to pos 296 state 123) */,
+/* pos 296: state 123 */    0xAE /* '.' */, 0x01  /* (to pos 298 state 124) */,
+/* pos 298: state 124 */    0xB1 /* '1' */, 0x01  /* (to pos 300 state 125) */,
+/* pos 300: state 125 */    0xA0 /* ' ' */, 0x01  /* (to pos 302 state 126) */,
+/* pos 302: state 126 */    0x91, 0x00            /* - terminal marker 17 - */, 
+/* pos 304: state 127 */    0x63 /* 'c' */, 0x02  /* (to pos 308 state 128) */,
+                            0xF5 /* 'u' */, 0x41  /* (to pos 436 state 190) */,
+/* pos 308: state 128 */    0xE3 /* 'c' */, 0x01  /* (to pos 310 state 129) */,
+/* pos 310: state 129 */    0xE5 /* 'e' */, 0x01  /* (to pos 312 state 130) */,
+/* pos 312: state 130 */    0xF0 /* 'p' */, 0x01  /* (to pos 314 state 131) */,
+/* pos 314: state 131 */    0xF4 /* 't' */, 0x01  /* (to pos 316 state 132) */,
+/* pos 316: state 132 */    0x3A /* ':' */, 0x02  /* (to pos 320 state 133) */,
+                            0xAD /* '-' */, 0x14  /* (to pos 358 state 152) */,
+/* pos 320: state 133 */    0x92, 0x00            /* - terminal marker 18 - */, 
+/* pos 322: state 134 */    0xE6 /* 'f' */, 0x01  /* (to pos 324 state 135) */,
+/* pos 324: state 135 */    0xAD /* '-' */, 0x01  /* (to pos 326 state 136) */,
+/* pos 326: state 136 */    0xED /* 'm' */, 0x01  /* (to pos 328 state 137) */,
+/* pos 328: state 137 */    0xEF /* 'o' */, 0x01  /* (to pos 330 state 138) */,
+/* pos 330: state 138 */    0xE4 /* 'd' */, 0x01  /* (to pos 332 state 139) */,
+/* pos 332: state 139 */    0xE9 /* 'i' */, 0x01  /* (to pos 334 state 140) */,
+/* pos 334: state 140 */    0xE6 /* 'f' */, 0x01  /* (to pos 336 state 141) */,
+/* pos 336: state 141 */    0xE9 /* 'i' */, 0x01  /* (to pos 338 state 142) */,
+/* pos 338: state 142 */    0xE5 /* 'e' */, 0x01  /* (to pos 340 state 143) */,
+/* pos 340: state 143 */    0xE4 /* 'd' */, 0x01  /* (to pos 342 state 144) */,
+/* pos 342: state 144 */    0xAD /* '-' */, 0x01  /* (to pos 344 state 145) */,
+/* pos 344: state 145 */    0xF3 /* 's' */, 0x01  /* (to pos 346 state 146) */,
+/* pos 346: state 146 */    0xE9 /* 'i' */, 0x01  /* (to pos 348 state 147) */,
+/* pos 348: state 147 */    0xEE /* 'n' */, 0x01  /* (to pos 350 state 148) */,
+/* pos 350: state 148 */    0xE3 /* 'c' */, 0x01  /* (to pos 352 state 149) */,
+/* pos 352: state 149 */    0xE5 /* 'e' */, 0x01  /* (to pos 354 state 150) */,
+/* pos 354: state 150 */    0xBA /* ':' */, 0x01  /* (to pos 356 state 151) */,
+/* pos 356: state 151 */    0x93, 0x00            /* - terminal marker 19 - */, 
+/* pos 358: state 152 */    0x65 /* 'e' */, 0x02  /* (to pos 362 state 153) */,
+                            0xEC /* 'l' */, 0x0A  /* (to pos 380 state 162) */,
+/* pos 362: state 153 */    0xEE /* 'n' */, 0x01  /* (to pos 364 state 154) */,
+/* pos 364: state 154 */    0xE3 /* 'c' */, 0x01  /* (to pos 366 state 155) */,
+/* pos 366: state 155 */    0xEF /* 'o' */, 0x01  /* (to pos 368 state 156) */,
+/* pos 368: state 156 */    0xE4 /* 'd' */, 0x01  /* (to pos 370 state 157) */,
+/* pos 370: state 157 */    0xE9 /* 'i' */, 0x01  /* (to pos 372 state 158) */,
+/* pos 372: state 158 */    0xEE /* 'n' */, 0x01  /* (to pos 374 state 159) */,
+/* pos 374: state 159 */    0xE7 /* 'g' */, 0x01  /* (to pos 376 state 160) */,
+/* pos 376: state 160 */    0xBA /* ':' */, 0x01  /* (to pos 378 state 161) */,
+/* pos 378: state 161 */    0x94, 0x00            /* - terminal marker 20 - */, 
+/* pos 380: state 162 */    0xE1 /* 'a' */, 0x01  /* (to pos 382 state 163) */,
+/* pos 382: state 163 */    0xEE /* 'n' */, 0x01  /* (to pos 384 state 164) */,
+/* pos 384: state 164 */    0xE7 /* 'g' */, 0x01  /* (to pos 386 state 165) */,
+/* pos 386: state 165 */    0xF5 /* 'u' */, 0x01  /* (to pos 388 state 166) */,
+/* pos 388: state 166 */    0xE1 /* 'a' */, 0x01  /* (to pos 390 state 167) */,
+/* pos 390: state 167 */    0xE7 /* 'g' */, 0x01  /* (to pos 392 state 168) */,
+/* pos 392: state 168 */    0xE5 /* 'e' */, 0x01  /* (to pos 394 state 169) */,
+/* pos 394: state 169 */    0xBA /* ':' */, 0x01  /* (to pos 396 state 170) */,
+/* pos 396: state 170 */    0x95, 0x00            /* - terminal marker 21 - */, 
+/* pos 398: state 171 */    0xE1 /* 'a' */, 0x01  /* (to pos 400 state 172) */,
+/* pos 400: state 172 */    0xE7 /* 'g' */, 0x01  /* (to pos 402 state 173) */,
+/* pos 402: state 173 */    0xED /* 'm' */, 0x01  /* (to pos 404 state 174) */,
+/* pos 404: state 174 */    0xE1 /* 'a' */, 0x01  /* (to pos 406 state 175) */,
+/* pos 406: state 175 */    0xBA /* ':' */, 0x01  /* (to pos 408 state 176) */,
+/* pos 408: state 176 */    0x96, 0x00            /* - terminal marker 22 - */, 
+/* pos 410: state 177 */    0xE3 /* 'c' */, 0x01  /* (to pos 412 state 178) */,
+/* pos 412: state 178 */    0xE8 /* 'h' */, 0x01  /* (to pos 414 state 179) */,
+/* pos 414: state 179 */    0xE5 /* 'e' */, 0x01  /* (to pos 416 state 180) */,
+/* pos 416: state 180 */    0xAD /* '-' */, 0x01  /* (to pos 418 state 181) */,
+/* pos 418: state 181 */    0xE3 /* 'c' */, 0x01  /* (to pos 420 state 182) */,
+/* pos 420: state 182 */    0xEF /* 'o' */, 0x01  /* (to pos 422 state 183) */,
+/* pos 422: state 183 */    0xEE /* 'n' */, 0x01  /* (to pos 424 state 184) */,
+/* pos 424: state 184 */    0xF4 /* 't' */, 0x01  /* (to pos 426 state 185) */,
+/* pos 426: state 185 */    0xF2 /* 'r' */, 0x01  /* (to pos 428 state 186) */,
+/* pos 428: state 186 */    0xEF /* 'o' */, 0x01  /* (to pos 430 state 187) */,
+/* pos 430: state 187 */    0xEC /* 'l' */, 0x01  /* (to pos 432 state 188) */,
+/* pos 432: state 188 */    0xBA /* ':' */, 0x01  /* (to pos 434 state 189) */,
+/* pos 434: state 189 */    0x97, 0x00            /* - terminal marker 23 - */, 
+/* pos 436: state 190 */    0xF4 /* 't' */, 0x01  /* (to pos 438 state 191) */,
+/* pos 438: state 191 */    0xE8 /* 'h' */, 0x01  /* (to pos 440 state 192) */,
+/* pos 440: state 192 */    0xEF /* 'o' */, 0x01  /* (to pos 442 state 193) */,
+/* pos 442: state 193 */    0xF2 /* 'r' */, 0x01  /* (to pos 444 state 194) */,
+/* pos 444: state 194 */    0xE9 /* 'i' */, 0x01  /* (to pos 446 state 195) */,
+/* pos 446: state 195 */    0xFA /* 'z' */, 0x01  /* (to pos 448 state 196) */,
+/* pos 448: state 196 */    0xE1 /* 'a' */, 0x01  /* (to pos 450 state 197) */,
+/* pos 450: state 197 */    0xF4 /* 't' */, 0x01  /* (to pos 452 state 198) */,
+/* pos 452: state 198 */    0xE9 /* 'i' */, 0x01  /* (to pos 454 state 199) */,
+/* pos 454: state 199 */    0xEF /* 'o' */, 0x01  /* (to pos 456 state 200) */,
+/* pos 456: state 200 */    0xEE /* 'n' */, 0x01  /* (to pos 458 state 201) */,
+/* pos 458: state 201 */    0xBA /* ':' */, 0x01  /* (to pos 460 state 202) */,
+/* pos 460: state 202 */    0x98, 0x00            /* - terminal marker 24 - */, 
+/* pos 462: state 203 */    0xEB /* 'k' */, 0x01  /* (to pos 464 state 204) */,
+/* pos 464: state 204 */    0xE9 /* 'i' */, 0x01  /* (to pos 466 state 205) */,
+/* pos 466: state 205 */    0xE5 /* 'e' */, 0x01  /* (to pos 468 state 206) */,
+/* pos 468: state 206 */    0xBA /* ':' */, 0x01  /* (to pos 470 state 207) */,
+/* pos 470: state 207 */    0x99, 0x00            /* - terminal marker 25 - */, 
+/* pos 472: state 208 */    0xE5 /* 'e' */, 0x01  /* (to pos 474 state 209) */,
+/* pos 474: state 209 */    0xEE /* 'n' */, 0x01  /* (to pos 476 state 210) */,
+/* pos 476: state 210 */    0xF4 /* 't' */, 0x01  /* (to pos 478 state 211) */,
+/* pos 478: state 211 */    0xAD /* '-' */, 0x01  /* (to pos 480 state 212) */,
+/* pos 480: state 212 */    0x6C /* 'l' */, 0x02  /* (to pos 484 state 213) */,
+                            0xF4 /* 't' */, 0x08  /* (to pos 498 state 220) */,
+/* pos 484: state 213 */    0xE5 /* 'e' */, 0x01  /* (to pos 486 state 214) */,
+/* pos 486: state 214 */    0xEE /* 'n' */, 0x01  /* (to pos 488 state 215) */,
+/* pos 488: state 215 */    0xE7 /* 'g' */, 0x01  /* (to pos 490 state 216) */,
+/* pos 490: state 216 */    0xF4 /* 't' */, 0x01  /* (to pos 492 state 217) */,
+/* pos 492: state 217 */    0xE8 /* 'h' */, 0x01  /* (to pos 494 state 218) */,
+/* pos 494: state 218 */    0xBA /* ':' */, 0x01  /* (to pos 496 state 219) */,
+/* pos 496: state 219 */    0x9A, 0x00            /* - terminal marker 26 - */, 
+/* pos 498: state 220 */    0xF9 /* 'y' */, 0x01  /* (to pos 500 state 221) */,
+/* pos 500: state 221 */    0xF0 /* 'p' */, 0x01  /* (to pos 502 state 222) */,
+/* pos 502: state 222 */    0xE5 /* 'e' */, 0x01  /* (to pos 504 state 223) */,
+/* pos 504: state 223 */    0xBA /* ':' */, 0x01  /* (to pos 506 state 224) */,
+/* pos 506: state 224 */    0x9B, 0x00            /* - terminal marker 27 - */, 
+/* pos 508: state 225 */    0xE1 /* 'a' */, 0x01  /* (to pos 510 state 226) */,
+/* pos 510: state 226 */    0xF4 /* 't' */, 0x01  /* (to pos 512 state 227) */,
+/* pos 512: state 227 */    0xE5 /* 'e' */, 0x01  /* (to pos 514 state 228) */,
+/* pos 514: state 228 */    0xBA /* ':' */, 0x01  /* (to pos 516 state 229) */,
+/* pos 516: state 229 */    0x9C, 0x00            /* - terminal marker 28 - */, 
+/* pos 518: state 230 */    0x61 /* 'a' */, 0x02  /* (to pos 522 state 231) */,
+                            0xE5 /* 'e' */, 0x06  /* (to pos 532 state 236) */,
+/* pos 522: state 231 */    0xEE /* 'n' */, 0x01  /* (to pos 524 state 232) */,
+/* pos 524: state 232 */    0xE7 /* 'g' */, 0x01  /* (to pos 526 state 233) */,
+/* pos 526: state 233 */    0xE5 /* 'e' */, 0x01  /* (to pos 528 state 234) */,
+/* pos 528: state 234 */    0xBA /* ':' */, 0x01  /* (to pos 530 state 235) */,
+/* pos 530: state 235 */    0x9D, 0x00            /* - terminal marker 29 - */, 
+/* pos 532: state 236 */    0xE6 /* 'f' */, 0x01  /* (to pos 534 state 237) */,
+/* pos 534: state 237 */    0xE5 /* 'e' */, 0x01  /* (to pos 536 state 238) */,
+/* pos 536: state 238 */    0xF2 /* 'r' */, 0x01  /* (to pos 538 state 239) */,
+/* pos 538: state 239 */    0xE5 /* 'e' */, 0x01  /* (to pos 540 state 240) */,
+/* pos 540: state 240 */    0xF2 /* 'r' */, 0x01  /* (to pos 542 state 241) */,
+/* pos 542: state 241 */    0xBA /* ':' */, 0x01  /* (to pos 544 state 242) */,
+/* pos 544: state 242 */    0x9E, 0x00            /* - terminal marker 30 - */, 
+/* total size 546 bytes */
index 42deebd..3c9187a 100644 (file)
@@ -217,12 +217,18 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
        }
 
 
-       if (wsi->mode == LWS_CONNMODE_HTTP_SERVING_ACCEPTED && wsi->u.http.fd >= 0) {
-               lwsl_debug("closing http fd %d\n", wsi->u.http.fd);
-               close(wsi->u.http.fd);
-               wsi->u.http.fd = -1;
-               context->protocols[0].callback(context, wsi,
-                       LWS_CALLBACK_CLOSED_HTTP, wsi->user_space, NULL, 0);
+       if (wsi->mode == LWS_CONNMODE_HTTP_SERVING_ACCEPTED) {
+               if (wsi->u.http.post_buffer) {
+                       free(wsi->u.http.post_buffer);
+                       wsi->u.http.post_buffer = NULL;
+               }
+               if (wsi->u.http.fd >= 0) {
+                       lwsl_debug("closing http fd %d\n", wsi->u.http.fd);
+                       close(wsi->u.http.fd);
+                       wsi->u.http.fd = -1;
+                       context->protocols[0].callback(context, wsi,
+                               LWS_CALLBACK_CLOSED_HTTP, wsi->user_space, NULL, 0);
+               }
        }
 
 #ifndef LWS_NO_EXTENSIONS
index 89e3798..ade9f29 100644 (file)
@@ -147,6 +147,8 @@ enum libwebsocket_callback_reasons {
        LWS_CALLBACK_CLIENT_WRITEABLE,
        LWS_CALLBACK_SERVER_WRITEABLE,
        LWS_CALLBACK_HTTP,
+       LWS_CALLBACK_HTTP_BODY,
+       LWS_CALLBACK_HTTP_BODY_COMPLETION,
        LWS_CALLBACK_HTTP_FILE_COMPLETION,
        LWS_CALLBACK_HTTP_WRITEABLE,
        LWS_CALLBACK_FILTER_NETWORK_CONNECTION,
@@ -232,6 +234,7 @@ struct lws_tokens {
 
 enum lws_token_indexes {
        WSI_TOKEN_GET_URI,
+       WSI_TOKEN_POST_URI,
        WSI_TOKEN_HOST,
        WSI_TOKEN_CONNECTION,
        WSI_TOKEN_KEY1,
@@ -264,6 +267,7 @@ enum lws_token_indexes {
        WSI_TOKEN_HTTP_CACHE_CONTROL,
        WSI_TOKEN_HTTP_AUTHORIZATION,
        WSI_TOKEN_HTTP_COOKIE,
+       WSI_TOKEN_HTTP_CONTENT_LENGTH,
        WSI_TOKEN_HTTP_CONTENT_TYPE,
        WSI_TOKEN_HTTP_DATE,
        WSI_TOKEN_HTTP_RANGE,
@@ -398,6 +402,8 @@ enum lws_close_status {
 };
 
 enum http_status {
+       HTTP_STATUS_OK = 200,
+
        HTTP_STATUS_BAD_REQUEST = 400,
        HTTP_STATUS_UNAUTHORIZED,
        HTTP_STATUS_PAYMENT_REQUIRED,
@@ -499,6 +505,12 @@ struct libwebsocket_extension;
  *                             total number of client connections allowed set
  *                             by MAX_CLIENTS.
  *
+ *     LWS_CALLBACK_HTTP_BODY: the next @len bytes data from the http
+ *             request body HTTP connection is now available in @in.
+ *
+ *     LWS_CALLBACK_HTTP_BODY_COMPLETION: the expected amount of http request
+ *             body has been delivered
+ *
  *     LWS_CALLBACK_HTTP_WRITEABLE: you can write more down the http protocol
  *             link now.
  *
@@ -918,6 +930,7 @@ enum pending_timeout {
        PENDING_TIMEOUT_AWAITING_EXTENSION_CONNECT_RESPONSE,
        PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE,
        PENDING_TIMEOUT_SSL_ACCEPT,
+       PENDING_TIMEOUT_HTTP_CONTENT,
 };
 
 LWS_EXTERN void
index babe50e..26b625c 100644 (file)
@@ -20,6 +20,7 @@
 
 const char *set[] = {
        "get ",
+       "post ",
        "host:",
        "connection:",
        "sec-websocket-key1:",
@@ -48,6 +49,7 @@ const char *set[] = {
        "cache-control:",
        "authorization:",
        "cookie:",
+       "content-length:",
        "content-type:",
        "date:",
        "range:",
index 95753e5..0502f70 100644 (file)
@@ -178,6 +178,7 @@ int libwebsocket_parse(struct libwebsocket *wsi, unsigned char c)
 
        switch (wsi->u.hdr.parser_state) {
        case WSI_TOKEN_GET_URI:
+       case WSI_TOKEN_POST_URI:
        case WSI_TOKEN_HOST:
        case WSI_TOKEN_CONNECTION:
        case WSI_TOKEN_KEY1:
@@ -202,6 +203,7 @@ int libwebsocket_parse(struct libwebsocket *wsi, unsigned char c)
        case WSI_TOKEN_HTTP_CACHE_CONTROL:
        case WSI_TOKEN_HTTP_AUTHORIZATION:
        case WSI_TOKEN_HTTP_COOKIE:
+       case WSI_TOKEN_HTTP_CONTENT_LENGTH:
        case WSI_TOKEN_HTTP_CONTENT_TYPE:
        case WSI_TOKEN_HTTP_DATE:
        case WSI_TOKEN_HTTP_RANGE:
@@ -216,7 +218,7 @@ int libwebsocket_parse(struct libwebsocket *wsi, unsigned char c)
                                      wsi->u.hdr.parser_state]].len && c == ' ')
                        break;
 
-               if (wsi->u.hdr.parser_state != WSI_TOKEN_GET_URI)
+               if ((wsi->u.hdr.parser_state != WSI_TOKEN_GET_URI) && (wsi->u.hdr.parser_state != WSI_TOKEN_POST_URI))
                        goto check_eol;
 
                /* special URI processing... end at space */
@@ -391,7 +393,7 @@ swallow:
 
                if (wsi->u.hdr.lextable_pos < 0) {
                        /* this is not a header we know about */
-                       if (wsi->u.hdr.ah->frag_index[WSI_TOKEN_GET_URI] ||
+                       if (wsi->u.hdr.ah->frag_index[WSI_TOKEN_GET_URI] || wsi->u.hdr.ah->frag_index[WSI_TOKEN_POST_URI] ||
                                    wsi->u.hdr.ah->frag_index[WSI_TOKEN_HTTP]) {
                                /*
                                 * altready had the method, no idea what
@@ -420,6 +422,10 @@ swallow:
                                wsi->u.hdr.ah->frag_index[WSI_TOKEN_GET_URI]) {
                                lwsl_warn("Duplicated GET\n");
                                return -1;
+                       } else if (n == WSI_TOKEN_POST_URI &&
+                               wsi->u.hdr.ah->frag_index[WSI_TOKEN_POST_URI]) {
+                               lwsl_warn("Duplicated POST\n");
+                               return -1;
                        }
 
                        /*
@@ -477,6 +483,7 @@ start_fragment:
                /* skipping arg part of a name we didn't recognize */
        case WSI_TOKEN_SKIPPING:
                lwsl_parser("WSI_TOKEN_SKIPPING '%c'\n", c);
+
                if (c == '\x0d')
                        wsi->u.hdr.parser_state = WSI_TOKEN_SKIPPING_SAW_CR;
                break;
@@ -490,6 +497,7 @@ start_fragment:
                        wsi->u.hdr.parser_state = WSI_TOKEN_SKIPPING;
                break;
                /* we're done, ignore anything else */
+
        case WSI_PARSING_COMPLETE:
                lwsl_parser("WSI_PARSING_COMPLETE '%c'\n", c);
                break;
index 740066d..147253b 100644 (file)
@@ -182,6 +182,7 @@ enum lws_connection_states {
        WSI_STATE_HTTP,
        WSI_STATE_HTTP_ISSUING_FILE,
        WSI_STATE_HTTP_HEADERS,
+       WSI_STATE_HTTP_BODY,
        WSI_STATE_DEAD_SOCKET,
        WSI_STATE_ESTABLISHED,
        WSI_STATE_CLIENT_UNCONNECTED,
@@ -342,6 +343,11 @@ struct _lws_http_mode_related {
        int fd;
        unsigned long filepos;
        unsigned long filelen;
+
+       int content_length;
+       int content_length_seen;
+       int body_index;
+       unsigned char *post_buffer;
 };
 
 struct _lws_header_related {
index d9382cc..9ca5d21 100644 (file)
@@ -115,6 +115,7 @@ dump_handshake_info(struct libwebsocket *wsi)
        int n;
        static const char *token_names[] = {
                /*[WSI_TOKEN_GET_URI]           =*/ "GET URI",
+               /*[WSI_TOKEN_POST_URI]          =*/ "POST URI",
                /*[WSI_TOKEN_HOST]              =*/ "Host",
                /*[WSI_TOKEN_CONNECTION]        =*/ "Connection",
                /*[WSI_TOKEN_KEY1]              =*/ "key 1",
@@ -146,6 +147,7 @@ dump_handshake_info(struct libwebsocket *wsi)
                "Cache-Control:",
                "Authorization:",
                "Cookie:",
+               "Content-Length:",
                "Content-Type:",
                "Date:",
                "Range:",
@@ -230,6 +232,10 @@ static int callback_http(struct libwebsocket_context *context,
                        return -1;
                }
 
+               /* if a legal POST URL, let it continue and accept data */
+               if (lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI))
+                       return 0;
+
                /* check for the "send a big file by hand" example case */
 
                if (!strcmp((const char *)in, "/leaf.jpg")) {
@@ -335,6 +341,25 @@ static int callback_http(struct libwebsocket_context *context,
 
                break;
 
+       case LWS_CALLBACK_HTTP_BODY:
+               strncpy(buf, in, 20);
+               buf[20] = '\0';
+               if (len < 20)
+                       buf[len] = '\0';
+
+               lwsl_notice("LWS_CALLBACK_HTTP_BODY: %s... len %d\n",
+                               (const char *)buf, (int)len);
+
+               break;
+
+       case LWS_CALLBACK_HTTP_BODY_COMPLETION:
+               lwsl_notice("LWS_CALLBACK_HTTP_BODY_COMPLETION\n");
+               /* the whole of the sent body arried, close the connection */
+               libwebsockets_return_http_status(context, wsi,
+                                               HTTP_STATUS_OK, NULL);
+
+               return -1;
+
        case LWS_CALLBACK_HTTP_FILE_COMPLETION:
 //             lwsl_info("LWS_CALLBACK_HTTP_FILE_COMPLETION seen\n");
                /* kill the connection after we sent one file */