HTTP解析器 HTTP Parser

码农软件 · 软件分类 · 网络工具包 · 2019-02-28 08:29:39

软件介绍

C语言实现的HTTP解析器,提供请求和响应报文的解析功能,可用于高性能的HTTP应用程序中。它不使用任何系统调用及内存分配的功能,并且不缓冲任何数据,可以被随时中断使用。根据你的系统架构,它处理一个请求只消耗约40字节(而对于网络服务器就是每个连接)。

功能:

  • 不依赖第三方库
  • 处理持续流(keep-alive)
  • 分块解码
  • 支持Upgrade
  • 防止缓冲区溢出攻击

可以从HTTP消息中解析出下列信息:

  • 报头域及值
  • Content-Length
  • 请求方法
  • 响应代码
  • 传输编码
  • HTTP版本
  • 请求URL
  • 消息体

示例代码:

http_parser_settings settings;
settings.on_url = my_url_callback;
settings.on_header_field = my_header_field_callback;
/* ... */

http_parser *parser = malloc(sizeof(http_parser));
http_parser_init(parser, HTTP_REQUEST);
parser->data = my_socket;

本文地址:https://codercto.com/soft/d/298.html

Web Applications (Hacking Exposed)

Web Applications (Hacking Exposed)

Joel Scambray、Mike Shema / McGraw-Hill Osborne Media / 2002-06-19 / USD 49.99

Get in-depth coverage of Web application platforms and their vulnerabilities, presented the same popular format as the international bestseller, Hacking Exposed. Covering hacking scenarios across diff......一起来看看 《Web Applications (Hacking Exposed)》 这本书的介绍吧!

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具