1 2 /* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7 #ifndef _NXT_HTTP_SOURCE_H_INCLUDED_ 8 #define _NXT_HTTP_SOURCE_H_INCLUDED_ 9 10 11 typedef struct { 12 nxt_str_t copy; 13 uintptr_t data[3]; 14 } nxt_http_source_request_t; 15 16 17 typedef struct nxt_http_source_s nxt_http_source_t; 18 typedef nxt_int_t (*nxt_http_source_request_create_t)(nxt_http_source_t *hs); 19 20 21 struct nxt_http_source_s { 22 nxt_source_hook_t query; 23 nxt_source_hook_t *next; 24 25 nxt_upstream_source_t *upstream; 26 27 nxt_http_source_request_create_t request_create; 28 29 nxt_upstream_header_in_t header_in; 30 31 nxt_buf_t *rest; 32 33 uint32_t chunked; /* 1 bit */ 34 35 union { 36 nxt_http_source_request_t request; 37 } u; 38 }; 39 40 41 NXT_EXPORT void nxt_http_source_handler(nxt_task_t *task, 42 nxt_upstream_source_t *us, nxt_http_source_request_create_t request_create); 43 NXT_EXPORT nxt_int_t nxt_http_source_hash_create(nxt_mp_t *mp, 44 nxt_lvlhsh_t *lh); 45 46 47 #endif /* _NXT_HTTP_SOURCE_H_INCLUDED_ */ 48