当前位置: 首页 > 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…...

内存分配函数malloc kmalloc vmalloc

内存分配函数malloc kmalloc vmalloc malloc实现步骤: 1)请求大小调整:首先,malloc 需要调整用户请求的大小,以适应内部数据结构(例如,可能需要存储额外的元数据)。通常,这包括对齐调整,确保分配的内存地址满足特定硬件要求(如对齐到8字节或16字节边界)。 2)空闲…...

Unity3D中Gfx.WaitForPresent优化方案

前言 在Unity中&#xff0c;Gfx.WaitForPresent占用CPU过高通常表示主线程在等待GPU完成渲染&#xff08;即CPU被阻塞&#xff09;&#xff0c;这表明存在GPU瓶颈或垂直同步/帧率设置问题。以下是系统的优化方案&#xff1a; 对惹&#xff0c;这里有一个游戏开发交流小组&…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

视频字幕质量评估的大规模细粒度基准

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 摘要 视频字幕在文本到视频生成任务中起着至关重要的作用&#xff0c;因为它们的质量直接影响所生成视频的语义连贯性和视觉保真度。尽管大型视觉-语言模型&#xff08;VLMs&#xff09;在字幕生成方面…...

Mac软件卸载指南,简单易懂!

刚和Adobe分手&#xff0c;它却总在Library里给你写"回忆录"&#xff1f;卸载的Final Cut Pro像电子幽灵般阴魂不散&#xff1f;总是会有残留文件&#xff0c;别慌&#xff01;这份Mac软件卸载指南&#xff0c;将用最硬核的方式教你"数字分手术"&#xff0…...

VTK如何让部分单位不可见

最近遇到一个需求&#xff0c;需要让一个vtkDataSet中的部分单元不可见&#xff0c;查阅了一些资料大概有以下几种方式 1.通过颜色映射表来进行&#xff0c;是最正规的做法 vtkNew<vtkLookupTable> lut; //值为0不显示&#xff0c;主要是最后一个参数&#xff0c;透明度…...

css的定位(position)详解:相对定位 绝对定位 固定定位

在 CSS 中&#xff0c;元素的定位通过 position 属性控制&#xff0c;共有 5 种定位模式&#xff1a;static&#xff08;静态定位&#xff09;、relative&#xff08;相对定位&#xff09;、absolute&#xff08;绝对定位&#xff09;、fixed&#xff08;固定定位&#xff09;和…...

uniapp微信小程序视频实时流+pc端预览方案

方案类型技术实现是否免费优点缺点适用场景延迟范围开发复杂度​WebSocket图片帧​定时拍照Base64传输✅ 完全免费无需服务器 纯前端实现高延迟高流量 帧率极低个人demo测试 超低频监控500ms-2s⭐⭐​RTMP推流​TRTC/即构SDK推流❌ 付费方案 &#xff08;部分有免费额度&#x…...

.Net Framework 4/C# 关键字(非常用,持续更新...)

一、is 关键字 is 关键字用于检查对象是否于给定类型兼容,如果兼容将返回 true,如果不兼容则返回 false,在进行类型转换前,可以先使用 is 关键字判断对象是否与指定类型兼容,如果兼容才进行转换,这样的转换是安全的。 例如有:首先创建一个字符串对象,然后将字符串对象隐…...

力扣-35.搜索插入位置

题目描述 给定一个排序数组和一个目标值&#xff0c;在数组中找到目标值&#xff0c;并返回其索引。如果目标值不存在于数组中&#xff0c;返回它将会被按顺序插入的位置。 请必须使用时间复杂度为 O(log n) 的算法。 class Solution {public int searchInsert(int[] nums, …...