Actix-web 0.7.9/10/11 齐发,新特性、更新/修复等越发完善

栏目: Html5 · 发布时间: 7年前

内容简介:添加修复修复

Actix-web 0.7.9 发布内容:

添加

  • 添加了客户端关闭超时设置

  • 添加了慢速请求超时设置

  • 在慢速请求超时(#523)时,响应408

修复

  • 将HTTP1解码错误报告给客户端。(#512)

  • 在CORS中正确组合多个允许的origins。(#517)

  • 如果客户端断开(#511),则不调用Websocket服务器finished()

  • 在没有Content-Length标头的情况下发送,使用100,101,102,204的响应。(#521)

  • no_http2bind_* 方法中正确使用flag 。(#519)

Actix-web 0.7.910发布内容:

修复

  • 修复了在正常关机期间panic

Actix-web 0.7.911发布内容:

修复

  • 修复了http / 2的响应204

Actix-web介绍:

Actix web是Rust的一个简单,实用且极其快速的Web框架。

文档和社区资源

extern crate actix_web;
use actix_web::{http, server, App, Path, Responder};

fn index(info: Path<(u32, String)>) -> impl Responder {
    format!("Hello {}! id:{}", info.1, info.0)
}

fn main() {
    server::new(
        || App::new()
            .route("/{id}/{name}/index.html", http::Method::GET, index))
        .bind("127.0.0.1:8080").unwrap()
        .run();
}

中文网站


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Mission Python

Mission Python

Sean McManus / No Starch Press / 2018-9-18 / GBP 24.99

Launch into coding with Mission Python, a space-themed guide to building a complete computer game in Python. You'll learn programming fundamentals like loops, strings, and lists as you build Escape!, ......一起来看看 《Mission Python》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具