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

【大模型RAG】拍照搜题技术架构速览:三层管道、两级检索、兜底大模型

摘要 拍照搜题系统采用“三层管道&#xff08;多模态 OCR → 语义检索 → 答案渲染&#xff09;、两级检索&#xff08;倒排 BM25 向量 HNSW&#xff09;并以大语言模型兜底”的整体框架&#xff1a; 多模态 OCR 层 将题目图片经过超分、去噪、倾斜校正后&#xff0c;分别用…...

云原生核心技术 (7/12): K8s 核心概念白话解读(上):Pod 和 Deployment 究竟是什么?

大家好&#xff0c;欢迎来到《云原生核心技术》系列的第七篇&#xff01; 在上一篇&#xff0c;我们成功地使用 Minikube 或 kind 在自己的电脑上搭建起了一个迷你但功能完备的 Kubernetes 集群。现在&#xff0c;我们就像一个拥有了一块崭新数字土地的农场主&#xff0c;是时…...

ssc377d修改flash分区大小

1、flash的分区默认分配16M、 / # df -h Filesystem Size Used Available Use% Mounted on /dev/root 1.9M 1.9M 0 100% / /dev/mtdblock4 3.0M...

Go 语言接口详解

Go 语言接口详解 核心概念 接口定义 在 Go 语言中&#xff0c;接口是一种抽象类型&#xff0c;它定义了一组方法的集合&#xff1a; // 定义接口 type Shape interface {Area() float64Perimeter() float64 } 接口实现 Go 接口的实现是隐式的&#xff1a; // 矩形结构体…...

Auto-Coder使用GPT-4o完成:在用TabPFN这个模型构建一个预测未来3天涨跌的分类任务

通过akshare库&#xff0c;获取股票数据&#xff0c;并生成TabPFN这个模型 可以识别、处理的格式&#xff0c;写一个完整的预处理示例&#xff0c;并构建一个预测未来 3 天股价涨跌的分类任务 用TabPFN这个模型构建一个预测未来 3 天股价涨跌的分类任务&#xff0c;进行预测并输…...

Robots.txt 文件

什么是robots.txt&#xff1f; robots.txt 是一个位于网站根目录下的文本文件&#xff08;如&#xff1a;https://example.com/robots.txt&#xff09;&#xff0c;它用于指导网络爬虫&#xff08;如搜索引擎的蜘蛛程序&#xff09;如何抓取该网站的内容。这个文件遵循 Robots…...

HTML前端开发:JavaScript 常用事件详解

作为前端开发的核心&#xff0c;JavaScript 事件是用户与网页交互的基础。以下是常见事件的详细说明和用法示例&#xff1a; 1. onclick - 点击事件 当元素被单击时触发&#xff08;左键点击&#xff09; button.onclick function() {alert("按钮被点击了&#xff01;&…...

代理篇12|深入理解 Vite中的Proxy接口代理配置

在前端开发中,常常会遇到 跨域请求接口 的情况。为了解决这个问题,Vite 和 Webpack 都提供了 proxy 代理功能,用于将本地开发请求转发到后端服务器。 什么是代理(proxy)? 代理是在开发过程中,前端项目通过开发服务器,将指定的请求“转发”到真实的后端服务器,从而绕…...

【C++特殊工具与技术】优化内存分配(一):C++中的内存分配

目录 一、C 内存的基本概念​ 1.1 内存的物理与逻辑结构​ 1.2 C 程序的内存区域划分​ 二、栈内存分配​ 2.1 栈内存的特点​ 2.2 栈内存分配示例​ 三、堆内存分配​ 3.1 new和delete操作符​ 4.2 内存泄漏与悬空指针问题​ 4.3 new和delete的重载​ 四、智能指针…...

关于uniapp展示PDF的解决方案

在 UniApp 的 H5 环境中使用 pdf-vue3 组件可以实现完整的 PDF 预览功能。以下是详细实现步骤和注意事项&#xff1a; 一、安装依赖 安装 pdf-vue3 和 PDF.js 核心库&#xff1a; npm install pdf-vue3 pdfjs-dist二、基本使用示例 <template><view class"con…...