src/http/ngx_http_core_module.h - nginx-1.31.7 nginx/ @ 939334eff

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_HTTP_CORE_H_INCLUDED_
  6. ‌#define _NGX_HTTP_CORE_H_INCLUDED_


  7. #include <ngx_config.h>
  8. #include <ngx_core.h>
  9. #include <ngx_http.h>

  10. #if (NGX_THREADS)
  11. #include <ngx_thread_pool.h>
  12. #elif (NGX_COMPAT)
  13. ‌typedef struct ngx_thread_pool_s  ngx_thread_pool_t;
  14. #endif


  15. ‌#define NGX_HTTP_GZIP_PROXIED_OFF       0x0002
  16. ‌#define NGX_HTTP_GZIP_PROXIED_EXPIRED   0x0004
  17. ‌#define NGX_HTTP_GZIP_PROXIED_NO_CACHE  0x0008
  18. ‌#define NGX_HTTP_GZIP_PROXIED_NO_STORE  0x0010
  19. ‌#define NGX_HTTP_GZIP_PROXIED_PRIVATE   0x0020
  20. ‌#define NGX_HTTP_GZIP_PROXIED_NO_LM     0x0040
  21. ‌#define NGX_HTTP_GZIP_PROXIED_NO_ETAG   0x0080
  22. ‌#define NGX_HTTP_GZIP_PROXIED_AUTH      0x0100
  23. ‌#define NGX_HTTP_GZIP_PROXIED_ANY       0x0200


  24. ‌#define NGX_HTTP_AIO_OFF                0
  25. ‌#define NGX_HTTP_AIO_ON                 1
  26. ‌#define NGX_HTTP_AIO_THREADS            2


  27. ‌#define NGX_HTTP_SATISFY_ALL            0
  28. ‌#define NGX_HTTP_SATISFY_ANY            1


  29. ‌#define NGX_HTTP_LINGERING_OFF          0
  30. ‌#define NGX_HTTP_LINGERING_ON           1
  31. ‌#define NGX_HTTP_LINGERING_ALWAYS       2


  32. ‌#define NGX_HTTP_IMS_OFF                0
  33. ‌#define NGX_HTTP_IMS_EXACT              1
  34. ‌#define NGX_HTTP_IMS_BEFORE             2


  35. ‌#define NGX_HTTP_KEEPALIVE_DISABLE_NONE    0x0002
  36. ‌#define NGX_HTTP_KEEPALIVE_DISABLE_MSIE6   0x0004
  37. ‌#define NGX_HTTP_KEEPALIVE_DISABLE_SAFARI  0x0008


  38. ‌#define NGX_HTTP_SERVER_TOKENS_OFF      0
  39. ‌#define NGX_HTTP_SERVER_TOKENS_ON       1
  40. ‌#define NGX_HTTP_SERVER_TOKENS_BUILD    2


  41. ‌typedef struct ngx_http_location_tree_node_s  ngx_http_location_tree_node_t;
  42. ‌typedef struct ngx_http_core_loc_conf_s  ngx_http_core_loc_conf_t;


  43. ‌typedef struct {
  44.     struct sockaddr           *sockaddr;
  45.     socklen_t                  socklen;
  46.     ngx_str_t                  addr_text;

  47.     unsigned                   set:1;
  48.     unsigned                   default_server:1;
  49.     unsigned                   bind:1;
  50.     unsigned                   wildcard:1;
  51.     unsigned                   ssl:1;
  52.     unsigned                   http2:1;
  53.     unsigned                   quic:1;
  54. #if (NGX_HAVE_INET6)
  55.     unsigned                   ipv6only:1;
  56. #endif
  57.     unsigned                   deferred_accept:1;
  58.     unsigned                   reuseport:1;
  59.     unsigned                   so_keepalive:2;
  60.     unsigned                   proxy_protocol:1;

  61.     int                        backlog;
  62.     int                        rcvbuf;
  63.     int                        sndbuf;
  64.     int                        type;
  65.     int                        protocol;
  66. #if (NGX_HAVE_SETFIB)
  67.     int                        setfib;
  68. #endif
  69. #if (NGX_HAVE_TCP_FASTOPEN)
  70.     int                        fastopen;
  71. #endif
  72. #if (NGX_HAVE_KEEPALIVE_TUNABLE)
  73.     int                        tcp_keepidle;
  74.     int                        tcp_keepintvl;
  75.     int                        tcp_keepcnt;
  76. #endif

  77. #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
  78.     char                      *accept_filter;
  79. #endif
  80. ‌} ngx_http_listen_opt_t;


  81. ‌typedef enum {
  82.     NGX_HTTP_POST_READ_PHASE = 0,

  83.     NGX_HTTP_SERVER_REWRITE_PHASE,

  84.     NGX_HTTP_FIND_CONFIG_PHASE,
  85.     NGX_HTTP_REWRITE_PHASE,
  86.     NGX_HTTP_POST_REWRITE_PHASE,

  87.     NGX_HTTP_PREACCESS_PHASE,

  88.     NGX_HTTP_ACCESS_PHASE,
  89.     NGX_HTTP_POST_ACCESS_PHASE,

  90.     NGX_HTTP_PRECONTENT_PHASE,

  91.     NGX_HTTP_CONTENT_PHASE,

  92.     NGX_HTTP_LOG_PHASE
  93. ‌} ngx_http_phases;

  94. ‌typedef struct ngx_http_phase_handler_s  ngx_http_phase_handler_t;

  95. ‌typedef ngx_int_t (*ngx_http_phase_handler_pt)(ngx_http_request_t *r,
  96.     ngx_http_phase_handler_t *ph);

  97. ‌struct ngx_http_phase_handler_s {
  98.     ngx_http_phase_handler_pt  checker;
  99.     ngx_http_handler_pt        handler;
  100.     ngx_uint_t                 next;
  101. };


  102. ‌typedef struct {
  103.     ngx_http_phase_handler_t  *handlers;
  104.     ngx_uint_t                 server_rewrite_index;
  105.     ngx_uint_t                 location_rewrite_index;
  106. ‌} ngx_http_phase_engine_t;


  107. ‌typedef struct {
  108.     ngx_array_t                handlers;
  109. ‌} ngx_http_phase_t;


  110. ‌typedef struct {
  111.     ngx_array_t                servers;         /* ngx_http_core_srv_conf_t */

  112.     ngx_http_phase_engine_t    phase_engine;

  113.     ngx_hash_t                 headers_in_hash;

  114.     ngx_hash_t                 variables_hash;

  115.     ngx_array_t                variables;         /* ngx_http_variable_t */
  116.     ngx_array_t                prefix_variables;  /* ngx_http_variable_t */
  117.     ngx_uint_t                 ncaptures;

  118.     ngx_uint_t                 server_names_hash_max_size;
  119.     ngx_uint_t                 server_names_hash_bucket_size;

  120.     ngx_uint_t                 variables_hash_max_size;
  121.     ngx_uint_t                 variables_hash_bucket_size;

  122.     ngx_hash_keys_arrays_t    *variables_keys;

  123.     ngx_array_t               *ports;

  124.     ngx_http_phase_t           phases[NGX_HTTP_LOG_PHASE + 1];
  125. ‌} ngx_http_core_main_conf_t;


  126. ‌typedef struct {
  127.     /* array of the ngx_http_server_name_t, "server_name" directive */
  128.     ngx_array_t                 server_names;

  129.     /* server ctx */
  130.     ngx_http_conf_ctx_t        *ctx;

  131.     u_char                     *file_name;
  132.     ngx_uint_t                  line;

  133.     ngx_str_t                   server_name;

  134.     size_t                      connection_pool_size;
  135.     size_t                      request_pool_size;
  136.     size_t                      client_header_buffer_size;

  137.     ngx_bufs_t                  large_client_header_buffers;

  138.     ngx_msec_t                  client_header_timeout;

  139.     ngx_uint_t                  max_headers;

  140.     ngx_flag_t                  ignore_invalid_headers;
  141.     ngx_flag_t                  merge_slashes;
  142.     ngx_flag_t                  underscores_in_headers;

  143.     ngx_array_t                *client_body_early_read;

  144.     unsigned                    listen:1;
  145. #if (NGX_PCRE)
  146.     unsigned                    captures:1;
  147. #endif
  148.     unsigned                    allow_connect:1;

  149.     ngx_http_core_loc_conf_t  **named_locations;
  150. ‌} ngx_http_core_srv_conf_t;


  151. /* list of structures to find core_srv_conf quickly at run time */


  152. ‌typedef struct {
  153. #if (NGX_PCRE)
  154.     ngx_http_regex_t          *regex;
  155. #endif
  156.     ngx_http_core_srv_conf_t  *server;   /* virtual name server conf */
  157.     ngx_str_t                  name;
  158. ‌} ngx_http_server_name_t;


  159. ‌typedef struct {
  160.     ngx_hash_combined_t        names;

  161.     ngx_uint_t                 nregex;
  162.     ngx_http_server_name_t    *regex;
  163. ‌} ngx_http_virtual_names_t;


  164. ‌struct ngx_http_addr_conf_s {
  165.     /* the default server configuration for this address:port */
  166.     ngx_http_core_srv_conf_t  *default_server;

  167.     ngx_http_virtual_names_t  *virtual_names;

  168.     unsigned                   ssl:1;
  169.     unsigned                   http2:1;
  170.     unsigned                   quic:1;
  171.     unsigned                   proxy_protocol:1;
  172. };


  173. ‌typedef struct {
  174.     in_addr_t                  addr;
  175.     ngx_http_addr_conf_t       conf;
  176. ‌} ngx_http_in_addr_t;


  177. #if (NGX_HAVE_INET6)

  178. ‌typedef struct {
  179.     struct in6_addr            addr6;
  180.     ngx_http_addr_conf_t       conf;
  181. ‌} ngx_http_in6_addr_t;

  182. #endif


  183. ‌typedef struct {
  184.     /* ngx_http_in_addr_t or ngx_http_in6_addr_t */
  185.     void                      *addrs;
  186.     ngx_uint_t                 naddrs;
  187. ‌} ngx_http_port_t;


  188. ‌typedef struct {
  189.     ngx_int_t                  family;
  190.     ngx_int_t                  type;
  191.     in_port_t                  port;
  192.     ngx_array_t                addrs;     /* array of ngx_http_conf_addr_t */
  193. ‌} ngx_http_conf_port_t;


  194. ‌typedef struct {
  195.     ngx_http_listen_opt_t      opt;

  196.     unsigned                   protocols:3;
  197.     unsigned                   protocols_set:1;
  198.     unsigned                   protocols_changed:1;

  199.     ngx_hash_t                 hash;
  200.     ngx_hash_wildcard_t       *wc_head;
  201.     ngx_hash_wildcard_t       *wc_tail;

  202. #if (NGX_PCRE)
  203.     ngx_uint_t                 nregex;
  204.     ngx_http_server_name_t    *regex;
  205. #endif

  206.     /* the default server configuration for this address:port */
  207.     ngx_http_core_srv_conf_t  *default_server;
  208.     ngx_array_t                servers;  /* array of ngx_http_core_srv_conf_t */
  209. ‌} ngx_http_conf_addr_t;


  210. ‌typedef struct {
  211.     ngx_int_t                  status;
  212.     ngx_int_t                  overwrite;
  213.     ngx_http_complex_value_t   value;
  214.     ngx_str_t                  args;
  215. ‌} ngx_http_err_page_t;


  216. ‌struct ngx_http_core_loc_conf_s {
  217.     ngx_str_t     name;          /* location name */
  218.     ngx_str_t     escaped_name;

  219. #if (NGX_PCRE)
  220.     ngx_http_regex_t  *regex;
  221. #endif

  222.     ngx_uint_t    predicate;  /* variable index + 1 */

  223.     unsigned      noname:1;   /* "if () {}" block or limit_except */
  224.     unsigned      lmt_excpt:1;
  225.     unsigned      named:1;

  226.     unsigned      exact_match:1;
  227.     unsigned      noregex:1;

  228.     unsigned      auto_redirect:1;
  229. #if (NGX_HTTP_GZIP)
  230.     unsigned      gzip_disable_msie6:2;
  231.     unsigned      gzip_disable_degradation:2;
  232. #endif

  233.     ngx_http_location_tree_node_t   *static_locations;
  234. #if (NGX_PCRE)
  235.     ngx_http_core_loc_conf_t       **regex_locations;
  236. #endif
  237.     ngx_http_core_loc_conf_t       **predicate_locations;

  238.     /* pointer to the modules' loc_conf */
  239.     void        **loc_conf;

  240.     uint32_t      limit_except;
  241.     void        **limit_except_loc_conf;

  242.     ngx_http_handler_pt  handler;

  243.     /* location name length for inclusive location with inherited alias */
  244.     size_t        alias;
  245.     ngx_str_t     root;                    /* root, alias */
  246.     ngx_str_t     post_action;

  247.     ngx_array_t  *root_lengths;
  248.     ngx_array_t  *root_values;

  249.     ngx_array_t  *types;
  250.     ngx_hash_t    types_hash;
  251.     ngx_str_t     default_type;

  252.     off_t         client_max_body_size;    /* client_max_body_size */
  253.     off_t         directio;                /* directio */
  254.     off_t         directio_alignment;      /* directio_alignment */

  255.     size_t        client_body_buffer_size; /* client_body_buffer_size */
  256.     size_t        send_lowat;              /* send_lowat */
  257.     size_t        postpone_output;         /* postpone_output */
  258.     size_t        sendfile_max_chunk;      /* sendfile_max_chunk */
  259.     size_t        read_ahead;              /* read_ahead */
  260.     size_t        subrequest_output_buffer_size;
  261.                                            /* subrequest_output_buffer_size */

  262.     ngx_http_complex_value_t  *limit_rate; /* limit_rate */
  263.     ngx_http_complex_value_t  *limit_rate_after; /* limit_rate_after */

  264.     ngx_msec_t    client_body_timeout;     /* client_body_timeout */
  265.     ngx_msec_t    send_timeout;            /* send_timeout */
  266.     ngx_msec_t    keepalive_time;          /* keepalive_time */
  267.     ngx_msec_t    keepalive_timeout;       /* keepalive_timeout */
  268.     ngx_msec_t    keepalive_min_timeout;   /* keepalive_min_timeout */
  269.     ngx_msec_t    lingering_time;          /* lingering_time */
  270.     ngx_msec_t    lingering_timeout;       /* lingering_timeout */
  271.     ngx_msec_t    resolver_timeout;        /* resolver_timeout */
  272.     ngx_msec_t    auth_delay;              /* auth_delay */

  273.     ngx_resolver_t  *resolver;             /* resolver */

  274.     time_t        keepalive_header;        /* keepalive_timeout */

  275.     ngx_uint_t    keepalive_requests;      /* keepalive_requests */
  276.     ngx_uint_t    keepalive_disable;       /* keepalive_disable */
  277.     ngx_uint_t    satisfy;                 /* satisfy */
  278.     ngx_uint_t    lingering_close;         /* lingering_close */
  279.     ngx_uint_t    if_modified_since;       /* if_modified_since */
  280.     ngx_uint_t    max_ranges;              /* max_ranges */
  281.     ngx_uint_t    client_body_in_file_only; /* client_body_in_file_only */

  282.     ngx_flag_t    client_body_in_single_buffer;
  283.                                            /* client_body_in_singe_buffer */
  284.     ngx_flag_t    internal;                /* internal */
  285.     ngx_flag_t    sendfile;                /* sendfile */
  286.     ngx_flag_t    aio;                     /* aio */
  287.     ngx_flag_t    aio_write;               /* aio_write */
  288.     ngx_flag_t    tcp_nopush;              /* tcp_nopush */
  289.     ngx_flag_t    tcp_nodelay;             /* tcp_nodelay */
  290.     ngx_flag_t    reset_timedout_connection; /* reset_timedout_connection */
  291.     ngx_flag_t    absolute_redirect;       /* absolute_redirect */
  292.     ngx_flag_t    server_name_in_redirect; /* server_name_in_redirect */
  293.     ngx_flag_t    port_in_redirect;        /* port_in_redirect */
  294.     ngx_flag_t    msie_padding;            /* msie_padding */
  295.     ngx_flag_t    msie_refresh;            /* msie_refresh */
  296.     ngx_flag_t    log_not_found;           /* log_not_found */
  297.     ngx_flag_t    log_subrequest;          /* log_subrequest */
  298.     ngx_flag_t    recursive_error_pages;   /* recursive_error_pages */
  299.     ngx_uint_t    server_tokens;           /* server_tokens */
  300.     ngx_flag_t    chunked_transfer_encoding; /* chunked_transfer_encoding */
  301.     ngx_flag_t    etag;                    /* etag */

  302. #if (NGX_HTTP_GZIP)
  303.     ngx_flag_t    gzip_vary;               /* gzip_vary */

  304.     ngx_uint_t    gzip_http_version;       /* gzip_http_version */
  305.     ngx_uint_t    gzip_proxied;            /* gzip_proxied */

  306. #if (NGX_PCRE)
  307.     ngx_array_t  *gzip_disable;            /* gzip_disable */
  308. #endif
  309. #endif

  310. #if (NGX_THREADS || NGX_COMPAT)
  311.     ngx_thread_pool_t         *thread_pool;
  312.     ngx_http_complex_value_t  *thread_pool_value;
  313. #endif

  314. #if (NGX_HAVE_OPENAT)
  315.     ngx_uint_t    disable_symlinks;        /* disable_symlinks */
  316.     ngx_http_complex_value_t  *disable_symlinks_from;
  317. #endif

  318.     ngx_array_t  *early_hints;             /* early_hints */

  319.     ngx_array_t  *error_pages;             /* error_page */

  320.     ngx_path_t   *client_body_temp_path;   /* client_body_temp_path */

  321.     ngx_open_file_cache_t  *open_file_cache;
  322.     time_t        open_file_cache_valid;
  323.     ngx_uint_t    open_file_cache_min_uses;
  324.     ngx_flag_t    open_file_cache_errors;
  325.     ngx_flag_t    open_file_cache_events;

  326.     ngx_log_t    *error_log;

  327.     ngx_uint_t    types_hash_max_size;
  328.     ngx_uint_t    types_hash_bucket_size;

  329.     ngx_queue_t  *locations;

  330. #if 0
  331.     ngx_http_core_loc_conf_t  *prev_location;
  332. #endif
  333. };


  334. ‌typedef struct {
  335.     ngx_queue_t                      queue;
  336.     ngx_http_core_loc_conf_t        *exact;
  337.     ngx_http_core_loc_conf_t        *inclusive;
  338.     ngx_str_t                       *name;
  339.     u_char                          *file_name;
  340.     ngx_uint_t                       line;
  341.     ngx_queue_t                      list;
  342. ‌} ngx_http_location_queue_t;


  343. ‌struct ngx_http_location_tree_node_s {
  344.     ngx_http_location_tree_node_t   *left;
  345.     ngx_http_location_tree_node_t   *right;
  346.     ngx_http_location_tree_node_t   *tree;

  347.     ngx_http_core_loc_conf_t        *exact;
  348.     ngx_http_core_loc_conf_t        *inclusive;

  349.     u_short                          len;
  350.     u_char                           auto_redirect;
  351.     u_char                           name[1];
  352. };


  353. void ngx_http_core_run_phases(ngx_http_request_t *r);
  354. ngx_int_t ngx_http_core_generic_phase(ngx_http_request_t *r,
  355.     ngx_http_phase_handler_t *ph);
  356. ngx_int_t ngx_http_core_rewrite_phase(ngx_http_request_t *r,
  357.     ngx_http_phase_handler_t *ph);
  358. ngx_int_t ngx_http_core_find_config_phase(ngx_http_request_t *r,
  359.     ngx_http_phase_handler_t *ph);
  360. ngx_int_t ngx_http_core_post_rewrite_phase(ngx_http_request_t *r,
  361.     ngx_http_phase_handler_t *ph);
  362. ngx_int_t ngx_http_core_access_phase(ngx_http_request_t *r,
  363.     ngx_http_phase_handler_t *ph);
  364. ngx_int_t ngx_http_core_post_access_phase(ngx_http_request_t *r,
  365.     ngx_http_phase_handler_t *ph);
  366. ngx_int_t ngx_http_core_content_phase(ngx_http_request_t *r,
  367.     ngx_http_phase_handler_t *ph);


  368. void *ngx_http_test_content_type(ngx_http_request_t *r, ngx_hash_t *types_hash);
  369. ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r);
  370. void ngx_http_set_exten(ngx_http_request_t *r);
  371. ngx_int_t ngx_http_set_etag(ngx_http_request_t *r);
  372. void ngx_http_weak_etag(ngx_http_request_t *r);
  373. ngx_int_t ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status,
  374.     ngx_str_t *ct, ngx_http_complex_value_t *cv);
  375. u_char *ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *name,
  376.     size_t *root_length, size_t reserved);
  377. ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r);
  378. #if (NGX_HTTP_GZIP)
  379. ngx_int_t ngx_http_gzip_ok(ngx_http_request_t *r);
  380. #endif


  381. ngx_int_t ngx_http_subrequest(ngx_http_request_t *r,
  382.     ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **psr,
  383.     ngx_http_post_subrequest_t *ps, ngx_uint_t flags);
  384. ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r,
  385.     ngx_str_t *uri, ngx_str_t *args);
  386. ngx_int_t ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name);


  387. ngx_http_cleanup_t *ngx_http_cleanup_add(ngx_http_request_t *r, size_t size);


  388. ‌typedef ngx_int_t (*ngx_http_output_header_filter_pt)(ngx_http_request_t *r);
  389. ‌typedef ngx_int_t (*ngx_http_output_body_filter_pt)
  390.     (ngx_http_request_t *r, ngx_chain_t *chain);
  391. ‌typedef ngx_int_t (*ngx_http_request_body_filter_pt)
  392.     (ngx_http_request_t *r, ngx_chain_t *chain);


  393. ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *chain);
  394. ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain);
  395. ngx_int_t ngx_http_request_body_save_filter(ngx_http_request_t *r,
  396.     ngx_chain_t *chain);


  397. ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r,
  398.     ngx_http_core_loc_conf_t *clcf, ngx_str_t *path, ngx_open_file_info_t *of);

  399. ngx_int_t ngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr,
  400.     ngx_table_elt_t *headers, ngx_str_t *value, ngx_array_t *proxies,
  401.     int recursive);

  402. ngx_int_t ngx_http_link_multi_headers(ngx_http_request_t *r);


  403. extern ngx_module_t  ngx_http_core_module;

  404. extern ngx_uint_t ngx_http_max_module;

  405. extern ngx_str_t  ngx_http_core_get_method;


  406. ‌#define ngx_http_clear_content_length(r)                                      \
  407.                                                                               \
  408.     r->headers_out.content_length_n = -1;                                     \
  409.     if (r->headers_out.content_length) {                                      \
  410.         r->headers_out.content_length->hash = 0;                              \
  411.         r->headers_out.content_length = NULL;                                 \
  412.     }

  413. ‌#define ngx_http_clear_accept_ranges(r)                                       \
  414.                                                                               \
  415.     r->allow_ranges = 0;                                                      \
  416.     if (r->headers_out.accept_ranges) {                                       \
  417.         r->headers_out.accept_ranges->hash = 0;                               \
  418.         r->headers_out.accept_ranges = NULL;                                  \
  419.     }

  420. ‌#define ngx_http_clear_last_modified(r)                                       \
  421.                                                                               \
  422.     r->headers_out.last_modified_time = -1;                                   \
  423.     if (r->headers_out.last_modified) {                                       \
  424.         r->headers_out.last_modified->hash = 0;                               \
  425.         r->headers_out.last_modified = NULL;                                  \
  426.     }

  427. ‌#define ngx_http_clear_location(r)                                            \
  428.                                                                               \
  429.     if (r->headers_out.location) {                                            \
  430.         r->headers_out.location->hash = 0;                                    \
  431.         r->headers_out.location = NULL;                                       \
  432.     }

  433. ‌#define ngx_http_clear_etag(r)                                                \
  434.                                                                               \
  435.     if (r->headers_out.etag) {                                                \
  436.         r->headers_out.etag->hash = 0;                                        \
  437.         r->headers_out.etag = NULL;                                           \
  438.     }


  439. #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */