nxt_http.h (1925:b8a2ac618950) nxt_http.h (1936:953434450ea9)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_HTTP_H_INCLUDED_
8#define _NXT_HTTP_H_INCLUDED_

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

192 uint8_t logged; /* 1 bit */
193 uint8_t header_sent; /* 1 bit */
194 uint8_t inconsistent; /* 1 bit */
195 uint8_t error; /* 1 bit */
196 uint8_t websocket_handshake; /* 1 bit */
197};
198
199
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_HTTP_H_INCLUDED_
8#define _NXT_HTTP_H_INCLUDED_

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

192 uint8_t logged; /* 1 bit */
193 uint8_t header_sent; /* 1 bit */
194 uint8_t inconsistent; /* 1 bit */
195 uint8_t error; /* 1 bit */
196 uint8_t websocket_handshake; /* 1 bit */
197};
198
199
200typedef struct nxt_http_route_s nxt_http_route_t;
201typedef struct nxt_http_route_rule_s nxt_http_route_rule_t;
200typedef struct nxt_http_route_s nxt_http_route_t;
201typedef struct nxt_http_route_rule_s nxt_http_route_rule_t;
202typedef struct nxt_http_route_addr_rule_s nxt_http_route_addr_rule_t;
202
203
204typedef struct {
205 nxt_conf_value_t *pass;
206 nxt_conf_value_t *ret;
207 nxt_str_t location;
208 nxt_conf_value_t *proxy;
209 nxt_conf_value_t *share;

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

249 void (*peer_read)(nxt_task_t *task, nxt_http_peer_t *peer);
250 void (*peer_close)(nxt_task_t *task, nxt_http_peer_t *peer);
251
252 void (*ws_frame_start)(nxt_task_t *task, nxt_http_request_t *r,
253 nxt_buf_t *ws_frame);
254} nxt_http_proto_table_t;
255
256
203
204
205typedef struct {
206 nxt_conf_value_t *pass;
207 nxt_conf_value_t *ret;
208 nxt_str_t location;
209 nxt_conf_value_t *proxy;
210 nxt_conf_value_t *share;

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

250 void (*peer_read)(nxt_task_t *task, nxt_http_peer_t *peer);
251 void (*peer_close)(nxt_task_t *task, nxt_http_peer_t *peer);
252
253 void (*ws_frame_start)(nxt_task_t *task, nxt_http_request_t *r,
254 nxt_buf_t *ws_frame);
255} nxt_http_proto_table_t;
256
257
258struct nxt_http_client_ip_s {
259 nxt_http_route_addr_rule_t *source;
260 nxt_str_t *header;
261 uint32_t header_hash;
262 uint8_t recursive; /* 1 bit */
263};
264
265
257#define NXT_HTTP_DATE_LEN nxt_length("Wed, 31 Dec 1986 16:40:00 GMT")
258
259nxt_inline u_char *
260nxt_http_date(u_char *buf, struct tm *tm)
261{
262 static const char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
263 "Sat" };
264

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

306nxt_http_action_t *nxt_http_action_create(nxt_task_t *task,
307 nxt_router_temp_conf_t *tmcf, nxt_str_t *name);
308nxt_int_t nxt_http_routes_resolve(nxt_task_t *task,
309 nxt_router_temp_conf_t *tmcf);
310nxt_int_t nxt_http_pass_segments(nxt_mp_t *mp, nxt_str_t *pass,
311 nxt_str_t *segments, nxt_uint_t n);
312nxt_http_action_t *nxt_http_pass_application(nxt_task_t *task,
313 nxt_router_conf_t *rtcf, nxt_str_t *name);
266#define NXT_HTTP_DATE_LEN nxt_length("Wed, 31 Dec 1986 16:40:00 GMT")
267
268nxt_inline u_char *
269nxt_http_date(u_char *buf, struct tm *tm)
270{
271 static const char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
272 "Sat" };
273

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

315nxt_http_action_t *nxt_http_action_create(nxt_task_t *task,
316 nxt_router_temp_conf_t *tmcf, nxt_str_t *name);
317nxt_int_t nxt_http_routes_resolve(nxt_task_t *task,
318 nxt_router_temp_conf_t *tmcf);
319nxt_int_t nxt_http_pass_segments(nxt_mp_t *mp, nxt_str_t *pass,
320 nxt_str_t *segments, nxt_uint_t n);
321nxt_http_action_t *nxt_http_pass_application(nxt_task_t *task,
322 nxt_router_conf_t *rtcf, nxt_str_t *name);
323nxt_http_route_addr_rule_t *nxt_http_route_addr_rule_create(
324 nxt_task_t *task, nxt_mp_t *mp, nxt_conf_value_t *cv);
325nxt_int_t nxt_http_route_addr_rule(nxt_http_request_t *r,
326 nxt_http_route_addr_rule_t *addr_rule, nxt_sockaddr_t *sockaddr);
314nxt_http_route_rule_t *nxt_http_route_types_rule_create(nxt_task_t *task,
315 nxt_mp_t *mp, nxt_conf_value_t *types);
316nxt_int_t nxt_http_route_test_rule(nxt_http_request_t *r,
317 nxt_http_route_rule_t *rule, u_char *start, size_t length);
318
319nxt_int_t nxt_http_action_init(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
320 nxt_conf_value_t *cv, nxt_http_action_t *action);
321void nxt_http_request_action(nxt_task_t *task, nxt_http_request_t *r,

--- 54 unchanged lines hidden ---
327nxt_http_route_rule_t *nxt_http_route_types_rule_create(nxt_task_t *task,
328 nxt_mp_t *mp, nxt_conf_value_t *types);
329nxt_int_t nxt_http_route_test_rule(nxt_http_request_t *r,
330 nxt_http_route_rule_t *rule, u_char *start, size_t length);
331
332nxt_int_t nxt_http_action_init(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
333 nxt_conf_value_t *cv, nxt_http_action_t *action);
334void nxt_http_request_action(nxt_task_t *task, nxt_http_request_t *r,

--- 54 unchanged lines hidden ---