nxt_http.h (1991:61155eb41a96) nxt_http.h (2078:0996dd223cdd)
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_

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

85typedef union {
86 void *any;
87 nxt_h1proto_t *h1;
88} nxt_http_proto_t;
89
90
91#define nxt_http_field_name_set(_field, _name) \
92 do { \
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_

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

85typedef union {
86 void *any;
87 nxt_h1proto_t *h1;
88} nxt_http_proto_t;
89
90
91#define nxt_http_field_name_set(_field, _name) \
92 do { \
93 (_field)->name_length = nxt_length(_name); \
94 (_field)->name = (u_char *) _name; \
93 (_field)->name_length = nxt_length(_name); \
94 (_field)->name = (u_char *) _name; \
95 } while (0)
96
97
98#define nxt_http_field_set(_field, _name, _value) \
99 do { \
95 } while (0)
96
97
98#define nxt_http_field_set(_field, _name, _value) \
99 do { \
100 (_field)->name_length = nxt_length(_name); \
101 (_field)->value_length = nxt_length(_value); \
102 (_field)->name = (u_char *) _name; \
103 (_field)->value = (u_char *) _value; \
100 (_field)->name_length = nxt_length(_name); \
101 (_field)->value_length = nxt_length(_value); \
102 (_field)->name = (u_char *) _name; \
103 (_field)->value = (u_char *) _value; \
104 } while (0)
105
106
107typedef struct {
108 nxt_list_t *fields;
109 nxt_http_field_t *date;
110 nxt_http_field_t *content_type;
111 nxt_http_field_t *content_length;

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

233 nxt_http_action_t *fallback;
234};
235
236
237typedef struct {
238 void (*body_read)(nxt_task_t *task, nxt_http_request_t *r);
239 void (*local_addr)(nxt_task_t *task, nxt_http_request_t *r);
240 void (*header_send)(nxt_task_t *task, nxt_http_request_t *r,
104 } while (0)
105
106
107typedef struct {
108 nxt_list_t *fields;
109 nxt_http_field_t *date;
110 nxt_http_field_t *content_type;
111 nxt_http_field_t *content_length;

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

233 nxt_http_action_t *fallback;
234};
235
236
237typedef struct {
238 void (*body_read)(nxt_task_t *task, nxt_http_request_t *r);
239 void (*local_addr)(nxt_task_t *task, nxt_http_request_t *r);
240 void (*header_send)(nxt_task_t *task, nxt_http_request_t *r,
241 nxt_work_handler_t body_handler, void *data);
241 nxt_work_handler_t body_handler, void *data);
242 void (*send)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *out);
243 nxt_off_t (*body_bytes_sent)(nxt_task_t *task, nxt_http_proto_t proto);
244 void (*discard)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *last);
245 void (*close)(nxt_task_t *task, nxt_http_proto_t proto,
246 nxt_socket_conf_joint_t *joint);
247
248 void (*peer_connect)(nxt_task_t *task, nxt_http_peer_t *peer);
249 void (*peer_header_send)(nxt_task_t *task, nxt_http_peer_t *peer);

--- 140 unchanged lines hidden ---
242 void (*send)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *out);
243 nxt_off_t (*body_bytes_sent)(nxt_task_t *task, nxt_http_proto_t proto);
244 void (*discard)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *last);
245 void (*close)(nxt_task_t *task, nxt_http_proto_t proto,
246 nxt_socket_conf_joint_t *joint);
247
248 void (*peer_connect)(nxt_task_t *task, nxt_http_peer_t *peer);
249 void (*peer_header_send)(nxt_task_t *task, nxt_http_peer_t *peer);

--- 140 unchanged lines hidden ---