当前位置: 首页 > news >正文

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;

相关文章:

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 …...

Docker 学习路线 2:底层技术

了解驱动Docker的核心技术将让您更深入地了解Docker的工作原理,并有助于您更有效地使用该平台。 Linux容器(LXC) Linux容器(LXC)是Docker的基础。 LXC是一种轻量级的虚拟化解决方案,允许多个隔离的Linux系…...

UEFI实战——显示图片

一、准备工作 1.1 BMP格式图片 参考:BMP格式详解获取“BMP格式详解”文档里的图片,命名为Logo.bmp将Logo.bmp图片放到U盘里,U盘格式FAT32二、实例代码 2.1 代码结构 TextPkg/ ├── Display.c ├── GetFile.c ├── Test.c ├── Test.dsc ├── Test.h └── Tes…...

Ansible中的playbook

目录 一、playbook简介 二、playbook的语法 三、playbook的核心组件 四、playbook的执行命令 五、vim 设定技巧 六、基本示例 一、playbook简介 1、playbook与ad-hoc相比,是一种完全不同的运用。 2、playbook是一种简单的配置管理系统与多机器部署系统的基础…...

怎样去除视频中的杂音,保留人声部分?

怎样去除视频中的杂音,保留人声部分?这个简单嘛!两种办法可以搞定:一是进行音频降噪,把无用的杂音消除掉;二是提取人声,将要保留的人声片段提取出来。 这就将两种实用的办公都分享出来&#xf…...

基于Qt QTreeView|QTreeWidget控件使用简单版

头文件解析: 这是一个C++代码文件,定义了一个名为MainWindow的类。以下是对每一句的详细解释: ```cpp #ifndef MAINWINDOW_H #define MAINWINDOW_H ``` 这是一个条件编译指令,用于避免头文件的重复包含。`MAINWINDOW_H`是一个宏定义,用于唯一标识这个头文件。 ```cpp #…...

edge浏览器的隐藏功能

1. edge://version 查看版本信息 2. edge://flags 特性界面 具体到某一特性:edge://flags/#overlay-scrollbars 3. edge://settings设置界面 详情可参考chrome: 4. edge://extensions 扩展程序页面 5. edge://net-internals 网络事件信息 6. edge://component…...

安卓抓包之小黄鸟

下载安装 下载地址: https://download.csdn.net/download/yijianxiangde100/88496463 安装apk 即可。 证书配置:...

Django中的FBV和CBV

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

信息泄露--

大唐电信AC简介 大唐电信科技股份有限公司是电信科学技术研究院(大唐电信科技产业集团)控股的的高科技企业,大唐电信已形成集成电路设计、软件与应用、终端设计、移动互联网四大产业板块。 大唐电信AC集中管理平台存在弱口令及敏感信息泄漏漏…...

C#WPF文本格式化模式实例

本文演示C#WPF文本格式化模式实例 WPF 文本渲染优缺点 WPF中的文本渲染和旧式的基于 GDI的应用程序的文本染有很大区别。很大一部分区 别是由于 WPF 的设备无关显示系统造成的,但 WPF 中的文本染也得到了显著增强,能更清晰地显示文本,在 LCD 监视器上尤其如此。 然而,W…...

嵌入式云平台一些基础概念的理解

1.SDK SDK是Software Development Kit的缩写,译为”软件开发工具包”,通常是为辅助开发某类软件而编写的特定软件包,框架集合等,SDK一般包含相关文档,范例和工具。 我自己的理解就似乎,SDK也就是软件开发工具包,他会为其使用者提供一些封装好的接口&…...

【项目管理】生命周期风险评估

规划阶段目标:识别系统的业务战略,以支撑系统的安全需求及安全战略 规划阶段评估重点:1、本阶段不需要识别资产和脆弱性;2、应根据被评估对象的应用对象、应用环境、业务状况、操作要求等方面识别威胁; 设计阶段目标…...

力扣 搜索旋转排序数组 二分

&#x1f468;‍&#x1f3eb; 33. 搜索旋转排序数组 class Solution {public int search(int[] nums, int target){int l 0;int r nums.length - 1;while (l < r){int m l r >> 1;//else大法&#xff0c;把无序段抛给else&#xff0c;if只处理有序段 // 需要特…...

【软件测试】个人博客项目测试报告

目录 1.报告概要 2、测试环境 3、手动测试用例编写 4、自动化测试用例 1.报告概要 测试对象&#xff1a;基于SSM项目的博客系统。 测试目的&#xff1a;检测博客项目是否符合预期&#xff0c;并且对测试知识进行练习和巩固。 测试点&#xff1a;主要针对常用的功能进行测…...

Express框架开发接口之今日推荐等模块

1.初始化 const handleDB require(../handleDB/index) // 获取全部模块 exports.allModule (req, res) > {(async function () {})() } // 更新或者添加模块 exports.upModule (req, res) > {(async function () {})() } // 根据id删除模块 exports.delModule (req, …...

UTONMOS:元宇宙顺势而上,重构数字化发展新形态

元宇宙&#xff08;Metaverse&#xff09;是一个虚拟的、且与现实世界平行的虚拟世界&#xff0c;由一系列相互关联的技术组成。在这个虚拟世界中&#xff0c;人们可以通过 VR、 AR等设备进入其中&#xff0c;与虚拟人物进行互动。 随着新一代信息技术的飞速发展&#xff0c;元…...

【Nginx37】Nginx学习:SSL模块(一)简单配置与指令介绍

Nginx学习&#xff1a;SSL模块&#xff08;一&#xff09;简单配置与指令介绍 又是一个重点模块&#xff0c;SSL 模块&#xff0c;其实就是我们常见的 HTTPS 所需要的配置模块。HTTPS 的重要性不用多说了吧&#xff0c;现在所有的 App、小程序 都强制要求是 HTTPS 的&#xff0…...

CompletableFuture 异步调用,获取返回值

ExecutorService executor new ThreadPoolExecutor(8, 16, 60,TimeUnit.MINUTES,new ArrayBlockingQueue<>(100));Random randomnew Random(10);//模拟查询用户列表List<User> listselectUsers();//需要执行的任务列表// 任务列表List<CompletableFuture<Us…...

excel利用正则匹配和替换指定内容

上班中, 突然接到电话, 屋里的上司大人发来个excel, 说要替换里面x-x-xxx列的内容为x栋x单元xxx. 大致表格如下, 原表格我就不发了 身为程序猿的我, 肯定第一就想到了 正则! 打开excel-开始-查找和替换, 我擦, 只能完全匹配和替换 比如一次只能替换1-1- -> 为1栋1单元 1-2…...

IPv4首部格式

IPv4首部格式 IPv4数据报的首部格式及其内容是实现IPv4协议各种功能的基础。 在TCPIP标准中&#xff0c;各种数据格式常常以32比特(即4字节)为单位来描述。 IPv4首部格式图 ## IPv4数据报的组成 主要由固定部分(20字节)可变部分(最大40字节) - 固定部分是指每个IPv4数据报都必…...

点云从入门到精通技术详解100篇-基于 3D 激光雷达的车厢冻煤存量检测

目录 前言 研究意义 研究现状(Research status) 3D 激光雷达检测技术研究现状...

idea使用MyBatisX插件

1.MyBatisX功能 (1).实现mapper和xml的跳转 (2).自动生成java文件&#xff0c;比如mapper、service、dao、pojo 2.安装MyBatisX插件 install后然后重启idea即可 3.使用MyBatieX实现mapper和xml跳转 &#xff08;1&#xff09;.点击mapper中的红色图标即可跳转到对应的xml方…...

Open3D(C++) 最小二乘拟合平面(间接平差法)

目录 一、算法原理1、原理概述2、参考文献二、代码实现三、结果展示本文由CSDN点云侠原创,原文链接。 一、算法原理 1、原理概述 通过传统最小二乘法对点云数据进行平面拟合时,可将误差只归因于一个方向上,本文假设误差只存在于 Z Z...

Linux中搭建coturn服务器

1、下载coturn源码 git clone https://github.com/coturn/coturn.git2、进入到coturn路径下&#xff0c;执行一下命令。 ./configure出现以下错误&#xff1a; 问题1&#xff1a;ERROR: OpenSSL Crypto development libraries are not installed properly in required locati…...

【Proteus仿真】【Arduino单片机】SG90舵机控制

文章目录 一、功能简介二、软件设计三、实验现象联系作者 一、功能简介 本项目使用Proteus8仿真Arduino单片机控制器&#xff0c;使用SG90舵机等。 主要功能&#xff1a; 系统运行后&#xff0c;舵机开始运行。 二、软件设计 /* 作者&#xff1a;嗨小易&#xff08;QQ&#x…...

程序员有哪些规避风险的合法兼职渠道?

近期&#xff0c;承德程序员事件冲上热搜&#xff0c;这对许多程序员的心灵是多么大的伤害啊&#xff01; 人人自危&#xff0c;大家开始顾虑自己接私活、找兼职的方式和前景了。毕竟&#xff0c;谁也不想”辛辛苦苦几十年&#xff0c;一把回到解放前“。那有什么办法既可以接私…...

OpenGL_Learn04

我这边并不是教程&#xff0c;只是学习记录&#xff0c;方便后面回顾&#xff0c;代码均是100%可以运行成功的。 1. 渐变三角形 #include <glad/glad.h> #include <GLFW/glfw3.h>#include <iostream> #include <cmath>void framebuffer_size_callba…...

【嵌入式】HC32F07X CAN通讯配置和使用配置不同缓冲器以连续发送

一 背景说明 使用小华&#xff08;华大&#xff09;的MCU HC32F07X实现 CAN 通讯配置和使用 二 原理分析 【1】CAN原理说明&#xff08;参考文章《CAN通信详解》&#xff09;&#xff1a; CAN是控制器局域网络(Controller Area Network, CAN)的简称&#xff0c;是一种能够实现…...

Linux的常见指令(一)

目录 一、文件 二、常见指令 1、pwd 2、ls 1、ls -a 2、ls -l 3、ls -i ​编辑 3、touch 4、mkdir 5、cd 6、rmdir 和 rm 7、man 8、cp 一、文件 目录和文件是在磁盘上建立的&#xff0c;空文件是在磁盘上占用空间的&#xff08;文件包括文件内容和文件的各种属…...