首页 > 其他分享 >关于Lua中的HTTP状态码以及Log等常量对照表

关于Lua中的HTTP状态码以及Log等常量对照表

时间:2023-11-21 10:36:24浏览次数:127  
标签:added HTTP Log Lua release 20 ngx first

一. HTTP Status

 

1xx

  • ngx.HTTP_CONTINUE (100) (first added in the v0.9.20 release)
  • ngx.HTTP_SWITCHING_PROTOCOLS (101) (first added in the v0.9.20 release)
     

2xx

  • ngx.HTTP_OK (200)
  • ngx.HTTP_CREATED (201)
  • ngx.HTTP_ACCEPTED (202) (first added in the v0.9.20 release)
  • ngx.HTTP_NO_CONTENT (204) (first added in the v0.9.20 release)
  • ngx.HTTP_PARTIAL_CONTENT (206) (first added in the v0.9.20 release)
     

3xx

  • ngx.HTTP_SPECIAL_RESPONSE (300)
  • ngx.HTTP_MOVED_PERMANENTLY (301)
  • ngx.HTTP_MOVED_TEMPORARILY (302)
  • ngx.HTTP_SEE_OTHER (303)
  • ngx.HTTP_NOT_MODIFIED (304)
  • ngx.HTTP_TEMPORARY_REDIRECT (307) (first added in the v0.9.20 release)
     

4xx

  • ngx.HTTP_BAD_REQUEST (400)
  • ngx.HTTP_UNAUTHORIZED (401)
  • ngx.HTTP_PAYMENT_REQUIRED (402) (first added in the v0.9.20 release)
  • ngx.HTTP_FORBIDDEN (403)
  • ngx.HTTP_NOT_FOUND (404)
  • ngx.HTTP_NOT_ALLOWED (405)
  • ngx.HTTP_NOT_ACCEPTABLE (406) (first added in the v0.9.20 release)
  • ngx.HTTP_REQUEST_TIMEOUT (408) (first added in the v0.9.20 release)
  • ngx.HTTP_CONFLICT (409) (first added in the v0.9.20 release)
  • ngx.HTTP_GONE (410)
  • ngx.HTTP_UPGRADE_REQUIRED (426) (first added in the v0.9.20 release)
  • ngx.HTTP_TOO_MANY_REQUESTS (429) (first added in the v0.9.20 release)
  • ngx.HTTP_CLOSE (444) (first added in the v0.9.20 release)
  • ngx.HTTP_ILLEGAL (451) (first added in the v0.9.20 release)
     

5xx

  • ngx.HTTP_INTERNAL_SERVER_ERROR (500)
  • ngx.HTTP_METHOD_NOT_IMPLEMENTED (501)
  • ngx.HTTP_BAD_GATEWAY (502) (first added in the v0.9.20 release)
  • ngx.HTTP_SERVICE_UNAVAILABLE (503)
  • ngx.HTTP_GATEWAY_TIMEOUT (504) (first added in the v0.3.1rc38 release)
  • ngx.HTTP_VERSION_NOT_SUPPORTED (505) (first added in the v0.9.20 release)
  • ngx.HTTP_INSUFFICIENT_STORAGE (507) (first added in the v0.9.20 release)
     

二. Log Level

 

  • ngx.STDERR -- 标准输出
  • ngx.EMERG -- 紧急报错
  • ngx.ALERT -- 报警
  • ngx.CRIT -- 严重,系统故障,触发运维告警系统
  • ngx.ERR -- 错误,业务不可恢复性错误
  • ngx.WARN -- 告警,业务中可忽略错误
  • ngx.NOTICE -- 提醒,业务比较重要信息
  • ngx.INFO -- 信息,业务琐碎日志信息,包含不同情况判断等
  • ngx.DEBUG -- 调试

标签:added,HTTP,Log,Lua,release,20,ngx,first
From: https://www.cnblogs.com/netWild/p/17845669.html

相关文章

  • .net 中log4net的使用
    新建一个配置文件log4net.config,右键文件属性,始终复制到生成目录下即可,配置文件可以根据自己的需要自行修改<?xmlversion="1.0"encoding="utf-8"?><log4net><appendername="RollingLogFileAppender"type="log4net.Appender.RollingFileAppender"&......
  • Ubuntu更新源文件报错:E: 仓库 “http://ppa.launchpad.net/chris-lea/node.js/ubuntu
    E:仓库“http://ppa.launchpad.net/chris-lea/node.js/ubuntubionicRelease”没有Release文件。一条命令解决sudoadd-apt-repository--removeppa:chris-lea/node.jssudoadd-apt-repository--removeppa:xxxxx/xxxxx再去执行sudoapt-getupdate就可以顺利的解决了......
  • C#删除程序的log文件
    删除方法privatevoidCleanOldLogs(stringlogFolderPath){try{DirectoryInfodirectory=newDirectoryInfo(logFolderPath);FileInfo[]files=directory.GetFiles();//计算删除的日期......
  • openwrt uhttpd 配置 ssl 证书用于 dnspod 域名
    uHTTPd 是一个OpenWrt/LUCI开发者从头编写的Web服务器。它着力于实现一个稳定高效的服务器,能够满足嵌入式设备的轻量级任务需求,且能够与OpenWrt的配置框架(UCI)整合。默认情况下它被用于OpenWrt的Web管理接口 LuCI。当然,uHTTPd也能提供一个常规Web服务器所需要......
  • C++与Lua交互之配置&交互原理&示例
    Lua简介Lua是一种轻量小巧的脚本语言,也是号称性能最高的脚本语言,它用C语言编写并以源代码形式开放。某些程序常常需要修改内容,而修改的内容不仅仅是数据,更要修改很多函数的行为。而修改函数行为这种事,很难用简单的更改数据的方式来实现,若在源代码层面上改又得重新编译生成,导......
  • https代理相对socks5代理有什么优势?
    随着互联网的快速发展,代理服务已成为许多人在访问敏感或地理位置受限的网站时所依赖的工具。其中,HTTPS代理和SOCKS5代理是两种最常用的代理服务类型。本文将探讨HTTPS代理相对SOCKS5代理的优势。1.安全性HTTPS代理使用SSL/TLS协议对客户端和代理服务器之间的数据进行加密,从而保护......
  • weblogic创建domain域
          ......
  • 【略读论文|时序知识图谱补全】Logic and Commonsense-Guided Temporal Knowledge Gra
    会议:AAAI,时间:2023,学校:北京航空航天大学文中谓词可以视为关系。以往的TKG补全(TKGC)方法不能同时表示事件的时效性和因果关系。为了应对这些问题,作者提出了一个逻辑和尝试引导嵌入模型(LCGE),从常识的角度共同学习涉及事件的及时性和因果关系的时间敏感表示,以及事件的时间无关表示......
  • log4j2 配置详解小结
    日志框架log4j2功能强大,了解配置信息对于我们使用log4j2很有必要,今天学习下相关的配置。目录ConfigurationPropertiesAppendersAppenderAppender-ConsoleAppender-FileAppender-RollingFileLoggerRootFilterStatusPoliciesLayoutsJsonLayoutPatternLayoutConfiguration定义......
  • Lua的基础与运用
    Lua编辑器Lua的基础Lua的教学网址Lua的编辑器编辑器调试 点击选项——调试参数配置,在脚本工作目录里选择位置,之后lua脚本都需要在该目录里,之后下面两个都打钩,点击确定。 窗口界面可以建立垂直布局  Lua的基础注释单行注释:--注释内容多行注释:--[[多行注......