Sha256: 7c7ee5aa2614f26dfb1074890956798aa41720905c9b8a505c8e33bd19be0bfa

Contents?: true

Size: 1.4 KB

Versions: 168

Compression:

Stored size: 1.4 KB

Contents

/**
 * Copyright (c) 2005 Zed A. Shaw
 * You can redistribute it and/or modify it under the same terms as Ruby.
 */

#ifndef http11_parser_h
#define http11_parser_h

#define RSTRING_NOT_MODIFIED 1
#include "ruby.h"

#include <sys/types.h>

#if defined(_WIN32)
#include <stddef.h>
#endif

#define BUFFER_LEN 1024

struct puma_parser;

typedef void (*element_cb)(struct puma_parser* hp,
                           const char *at, size_t length);

typedef void (*field_cb)(struct puma_parser* hp,
                         const char *field, size_t flen,
                         const char *value, size_t vlen);

typedef struct puma_parser {
  int cs;
  size_t body_start;
  int content_len;
  size_t nread;
  size_t mark;
  size_t field_start;
  size_t field_len;
  size_t query_start;

  VALUE request;
  VALUE body;

  field_cb http_field;
  element_cb request_method;
  element_cb request_uri;
  element_cb fragment;
  element_cb request_path;
  element_cb query_string;
  element_cb http_version;
  element_cb header_done;

  char buf[BUFFER_LEN];
  
} puma_parser;

int puma_parser_init(puma_parser *parser);
int puma_parser_finish(puma_parser *parser);
size_t puma_parser_execute(puma_parser *parser, const char *data,
                           size_t len, size_t off);
int puma_parser_has_error(puma_parser *parser);
int puma_parser_is_finished(puma_parser *parser);

#define puma_parser_nread(parser) (parser)->nread

#endif

Version data entries

168 entries across 165 versions & 18 rubygems

Version Path
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-input-fifo-0.9.1 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-input-fifo-0.9.0 vendor/bundle/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
puma-3.6.2-java ext/puma_http11/http11_parser.h
puma-3.6.2 ext/puma_http11/http11_parser.h
puma-3.6.1-java ext/puma_http11/http11_parser.h
puma-3.6.1 ext/puma_http11/http11_parser.h
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/puma-2.16.0-java/ext/puma_http11/http11_parser.h