Deleted Added
1
2/*
3 * Copyright (C) NGINX, Inc.
4 * Copyright (C) Valentin V. Bartenev
5 */
6
7#ifndef _NXT_HTTP_PARSER_H_INCLUDED_
8#define _NXT_HTTP_PARSER_H_INCLUDED_

--- 57 unchanged lines hidden (view full) ---

66typedef struct {
67 nxt_str_t name;
68 nxt_http_field_handler_t handler;
69 uintptr_t data;
70} nxt_http_fields_hash_entry_t;
71
72
73nxt_inline nxt_int_t
74nxt_http_parse_request_init(nxt_http_request_parse_t *rp, nxt_mem_pool_t *mp)
75{
76 rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t));
77 if (nxt_slow_path(rp->fields == NULL)){
78 return NXT_ERROR;
79 }
80
81 return NXT_OK;
82}
83
84
85nxt_int_t nxt_http_parse_request(nxt_http_request_parse_t *rp,
86 nxt_buf_mem_t *b);
87
88nxt_http_fields_hash_t *nxt_http_fields_hash_create(
89 nxt_http_fields_hash_entry_t *entries, nxt_mem_pool_t *mp);
90nxt_http_fields_hash_entry_t *nxt_http_fields_hash_lookup(
91 nxt_http_fields_hash_t *hash, nxt_http_field_t *field);
92
93nxt_int_t nxt_http_fields_process(nxt_list_t *fields,
94 nxt_http_fields_hash_t *hash, void *ctx, nxt_log_t *log);
95
96
97#endif /* _NXT_HTTP_PARSER_H_INCLUDED_ */