Sha256: afb445a1dae6beac3b8680d891665d7313def846b3ad234f7ff5eaebe5b8d394

Contents?: true

Size: 1.79 KB

Versions: 164

Compression:

Stored size: 1.79 KB

Contents

%%{
  
  machine puma_parser_common;

#### HTTP PROTOCOL GRAMMAR
# line endings
  CRLF = "\r\n";

# character types
  CTL = (cntrl | 127);
  safe = ("$" | "-" | "_" | ".");
  extra = ("!" | "*" | "'" | "(" | ")" | ",");
  reserved = (";" | "/" | "?" | ":" | "@" | "&" | "=" | "+");
  unsafe = (CTL | " " | "\"" | "#" | "%" | "<" | ">");
  national = any -- (alpha | digit | reserved | extra | safe | unsafe);
  unreserved = (alpha | digit | safe | extra | national);
  escape = ("%" xdigit xdigit);
  uchar = (unreserved | escape);
  pchar = (uchar | ":" | "@" | "&" | "=" | "+");
  tspecials = ("(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\\" | "\"" | "/" | "[" | "]" | "?" | "=" | "{" | "}" | " " | "\t");

# elements
  token = (ascii -- (CTL | tspecials));

# URI schemes and absolute paths
  scheme = ( alpha | digit | "+" | "-" | "." )* ;
  absolute_uri = (scheme ":" (uchar | reserved )*);

  path = ( pchar+ ( "/" pchar* )* ) ;
  query = ( uchar | reserved )* %query_string ;
  param = ( pchar | "/" )* ;
  params = ( param ( ";" param )* ) ;
  rel_path = ( path? %request_path (";" params)? ) ("?" %start_query query)?;
  absolute_path = ( "/"+ rel_path );

  Request_URI = ( "*" | absolute_uri | absolute_path ) >mark %request_uri;
  Fragment = ( uchar | reserved )* >mark %fragment;
  Method = ( upper | digit | safe ){1,20} >mark %request_method;

  http_number = ( digit+ "." digit+ ) ;
  HTTP_Version = ( "HTTP/" http_number ) >mark %http_version ;
  Request_Line = ( Method " " Request_URI ("#" Fragment){0,1} " " HTTP_Version CRLF ) ;

  field_name = ( token -- ":" )+ >start_field $snake_upcase_field %write_field;

  field_value = any* >start_value %write_value;

  message_header = field_name ":" " "* field_value :> CRLF;

  Request = Request_Line ( message_header )* ( CRLF @done );

main := Request;

}%%

Version data entries

164 entries across 161 versions & 18 rubygems

Version Path
logstash-output-scalyr-0.1.9 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.5 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.4 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.3 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-scalyr-0.1.2 vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-icinga-1.1.0 vendor/jruby/2.3.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser_common.rl