ngx_http_request_s

/* 
罗剑锋老师的注释参考:
https://github.com/chronolaw/annotated_nginx/blob/master/nginx/src/http/ngx_http_request.h
*/struct ngx_http_request_s {uint32_t                          signature;         /* "HTTP" */ngx_connection_t                 *connection;void                            **ctx;void                            **main_conf;void                            **srv_conf;void                            **loc_conf;ngx_http_event_handler_pt         read_event_handler;ngx_http_event_handler_pt         write_event_handler;#if (NGX_HTTP_CACHE)ngx_http_cache_t                 *cache;
#endifngx_http_upstream_t              *upstream;ngx_array_t                      *upstream_states;/* of ngx_http_upstream_state_t */ngx_pool_t                       *pool;ngx_buf_t                        *header_in;ngx_http_headers_in_t             headers_in;ngx_http_headers_out_t            headers_out;ngx_http_request_body_t          *request_body;time_t                            lingering_time;time_t                            start_sec;ngx_msec_t                        start_msec;ngx_uint_t                        method;ngx_uint_t                        http_version;ngx_str_t                         request_line;ngx_str_t                         uri;ngx_str_t                         args;ngx_str_t                         exten;ngx_str_t                         unparsed_uri;ngx_str_t                         method_name;ngx_str_t                         http_protocol;ngx_str_t                         schema;ngx_str_t                         charset;ngx_str_t						  cookie_self;ngx_str_t						  user_name;ngx_chain_t                      *out;ngx_http_request_t               *main;ngx_http_request_t               *parent;ngx_http_postponed_request_t     *postponed;ngx_http_post_subrequest_t       *post_subrequest;ngx_http_posted_request_t        *posted_requests;ngx_int_t                         phase_handler;ngx_http_handler_pt               content_handler;ngx_uint_t                        access_code;ngx_http_variable_value_t        *variables;#if (NGX_PCRE)ngx_uint_t                        ncaptures;int                              *captures;u_char                           *captures_data;
#endifsize_t                            limit_rate;size_t                            limit_rate_after;/* used to learn the Apache compatible response length without a header */size_t                            header_size;off_t                             request_length;ngx_uint_t                        err_status;ngx_http_connection_t            *http_connection;ngx_http_v2_stream_t             *stream;ngx_http_log_handler_pt           log_handler;ngx_http_cleanup_t               *cleanup;unsigned                          count:16;unsigned                          subrequests:8;unsigned                          blocked:8;unsigned                          aio:1;unsigned                          http_state:4;/* URI with "/." and on Win32 with "//" */unsigned                          complex_uri:1;/* URI with "%" */unsigned                          quoted_uri:1;/* URI with "+" */unsigned                          plus_in_uri:1;/* URI with empty path */unsigned                          empty_path_in_uri:1;unsigned                          invalid_header:1;unsigned                          add_uri_to_alias:1;unsigned                          valid_location:1;unsigned                          valid_unparsed_uri:1;unsigned                          uri_changed:1;unsigned                          uri_changes:4;unsigned                          request_body_in_single_buf:1;unsigned                          request_body_in_file_only:1;unsigned                          request_body_in_persistent_file:1;unsigned                          request_body_in_clean_file:1;unsigned                          request_body_file_group_access:1;unsigned                          request_body_file_log_level:3;unsigned                          request_body_no_buffering:1;unsigned                          subrequest_in_memory:1;unsigned                          waited:1;#if (NGX_HTTP_CACHE)unsigned                          cached:1;
#endif#if (NGX_HTTP_GZIP)unsigned                          gzip_tested:1;unsigned                          gzip_ok:1;unsigned                          gzip_vary:1;
#endif#if (NGX_PCRE)unsigned                          realloc_captures:1;
#endifunsigned                          proxy:1;unsigned                          bypass_cache:1;unsigned                          no_cache:1;/** instead of using the request context data in* ngx_http_limit_conn_module and ngx_http_limit_req_module* we use the bit fields in the request structure*/unsigned                          limit_conn_status:2;unsigned                          limit_req_status:3;unsigned                          limit_rate_set:1;unsigned                          limit_rate_after_set:1;#if 0unsigned                          cacheable:1;
#endifunsigned                          pipeline:1;unsigned                          chunked:1;unsigned                          header_only:1;unsigned                          expect_trailers:1;unsigned                          keepalive:1;unsigned                          lingering_close:1;unsigned                          discard_body:1;unsigned                          reading_body:1;unsigned                          internal:1;unsigned                          error_page:1;unsigned                          filter_finalize:1;unsigned                          post_action:1;unsigned                          request_complete:1;unsigned                          request_output:1;unsigned                          header_sent:1;unsigned                          expect_tested:1;unsigned                          root_tested:1;unsigned                          done:1;unsigned                          logged:1;unsigned                          buffered:4;unsigned                          main_filter_need_in_memory:1;unsigned                          filter_need_in_memory:1;unsigned                          filter_need_temporary:1;unsigned                          preserve_body:1;unsigned                          allow_ranges:1;unsigned                          subrequest_ranges:1;unsigned                          single_range:1;unsigned                          disable_not_modified:1;unsigned                          stat_reading:1;unsigned                          stat_writing:1;unsigned                          stat_processing:1;unsigned                          background:1;unsigned                          health_check:1;/* used to parse HTTP headers */ngx_uint_t                        state;ngx_uint_t                        header_hash;ngx_uint_t                        lowcase_index;u_char                            lowcase_header[NGX_HTTP_LC_HEADER_LEN];u_char                           *header_name_start;u_char                           *header_name_end;u_char                           *header_start;u_char                           *header_end;/** a memory that can be reused after parsing a request line* via ngx_http_ephemeral_t*/u_char                           *uri_start;u_char                           *uri_end;u_char                           *uri_ext;u_char                           *args_start;u_char                           *request_start;u_char                           *request_end;u_char                           *method_end;u_char                           *schema_start;u_char                           *schema_end;u_char                           *host_start;u_char                           *host_end;u_char                           *port_start;u_char                           *port_end;unsigned                          http_minor:16;unsigned                          http_major:16;
};

ngx_http_headers_out_t 

/* 
罗剑锋老师的注释参考:
https://github.com/chronolaw/annotated_nginx/blob/master/nginx/src/http/ngx_http_request.h
*/typedef struct {ngx_list_t                        headers;ngx_list_t                        trailers;ngx_uint_t                        status;ngx_str_t                         status_line;ngx_table_elt_t                  *server;ngx_table_elt_t                  *date;ngx_table_elt_t                  *content_length;ngx_table_elt_t                  *content_encoding;ngx_table_elt_t                  *location;ngx_table_elt_t                  *refresh;ngx_table_elt_t                  *last_modified;ngx_table_elt_t                  *content_range;ngx_table_elt_t                  *accept_ranges;ngx_table_elt_t                  *www_authenticate;ngx_table_elt_t                  *expires;ngx_table_elt_t                  *etag;ngx_str_t                        *override_charset;size_t                            content_type_len;ngx_str_t                         content_type;ngx_str_t                         charset;u_char                           *content_type_lowcase;ngx_uint_t                        content_type_hash;ngx_array_t                       cache_control;ngx_array_t                       link;off_t                             content_length_n;off_t                             content_offset;time_t                            date_time;time_t                            last_modified_time;
} ngx_http_headers_out_t;

ngx_list_t

typedef struct {ngx_list_part_t  *last;ngx_list_part_t   part;size_t            size;ngx_uint_t        nalloc;ngx_pool_t       *pool;
} ngx_list_t;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/158396.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

素材搜罗利器!产品设计必须知道的13款最佳网站!

灵感素材类 1.即时设计 在网页中搜索“即时设计”,进入官网后登录账号,之后进入「资源广场」版块便能看到即时设计提供的上万条设计素材。在搜索框内根据需要进行搜索,比如输入“网页设计”,便会看到即时设计提供的网页设计素材…

《现代C++语言核心特性解析》笔记(一)

一、新基础类型(C11~C20) C基础类型回顾一览表 1. 整数类型 long long 我们知道long通常表示一个32位整型,而long long则是用来表示一个64位的整型。不得不说,这种命名方式简单粗暴。不仅写法冗余,而且表…

记录 vue + vuetify + electron 安装过程

NodeJs 版本: 20 内容来自: Electron Vue.js Vuetify 构建跨平台应用_思月行云的博客-CSDN博客文章浏览阅读61次。Go coding!https://blog.csdn.net/kenkao/article/details/132600542 npm config set registry https://registry.npm.taobao.org np…

【HSPICE仿真】输入网表文件(6)用户自定义分析输出(.measure)

.measure语句的基本用法 1. 语句顺序2. 测量参数类型3. Rise, Fall, Delay, and Power Measurements4. FIND 和 WHEN 函数5. Equation Evaluation/Arithmetic Expression6. AVG, EM_AVG, INTEG, MIN, MAX, PP, and RMS基本语法示例 7. 输出文件格式MEASFORMMEASOUTMEASFILEMEAS…

SMTP邮件发送图片-如何在github中存储图片并访问

之前写了一篇文章 Go:实现SMTP邮件发送订阅功能(包含163邮箱、163企业邮箱、谷歌gmail邮箱),实现了通过邮箱服务来发送邮件,但都是文字内容,要是想实现邮件发送图片,就需要将图片放到公网可访问…

ssm银行账目管理系统-计算机毕设 附源码 93216

ssm银行账目管理系统的设计与实现 摘 要 大数据时代下,数据呈爆炸式地增长。为了迎合信息化时代的潮流和信息化安全的要求,利用互联网服务于其他行业,促进生产,已经是成为一种势不可挡的趋势。在银行账目管理的要求下,…

HTML、CSS和JavaScript,实现换肤效果的原理

这篇涉及到HTML DOM的节点类型、节点层级关系、DOM对象的继承关系、操作DOM节点和HTML元素 还用到HTML5的本地存储技术。 换肤效果的原理:是在选择某种皮肤样式之后,通过JavaScript脚本来加载选中的样式,再通过localStorage存储。 先来回忆…

Django中的FBV和CBV

一、两者的区别 1、在我们日常学习Django中,都是用的FBV(function base views)方式,就是在视图中用函数处理各种请求。而CBV(class base view)则是通过类来处理请求。 2、Python是一个面向对象的编程语言…

MSQL系列(十二) Mysql实战-为什么索引要建立在被驱动表上

Mysql实战-为什么索引要建立在被驱动表上 前面我们讲解了BTree的索引结构,也详细讲解下 left Join的底层驱动表 选择原理,那么今天我们来看看到底如何用以及如何建立索引和索引优化 开始之前我们先提一个问题, 为什么索引要建立在被驱动表上…

pycharm 断点调试python Flask

以flask框架为例,其启动命令为 python app.py runserver 后面需要拼接runserver 点击开始断点 参考:https://www.cnblogs.com/bigtreei/p/14742015.html

算法通过村第十八关-回溯|青铜笔记|什么叫回溯(中篇)

文章目录 前言回溯的核心问题撤销操作解释总结 前言 提示:阳光好的时候,会感觉还可以活很久,甚至可以活出喜悦。 --余秀华 回溯是非常重要的算法思想之一,主要解决一些暴力枚举也搞不定的问题(这里埋个坑💣…

SSM校园设备管信息管理系统开发mysql数据库web结构java编程计算机网页源码eclipse项目

选题理由 随着计算机网络及多媒体技术的广泛应用,互联网已成为高校办学的基础设施和必备条件,基于互联网的高校信息管理越来越综合化,越来越多的教学管理、行政管理工作将架构在互联网上,互联网正在变为学校实施教学、科研和管理…