1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-20 23:26:44 +00:00
This commit is contained in:
Nikolay Kim 2019-06-05 08:43:13 +06:00
parent ae64475d98
commit a548b69679
4 changed files with 9 additions and 8 deletions

View file

@ -693,11 +693,12 @@ where
}
} else {
// read socket into a buf
let should_disconnect = if !inner.flags.contains(Flags::READ_DISCONNECT) {
read_available(&mut inner.io, &mut inner.read_buf)?
} else {
None
};
let should_disconnect =
if !inner.flags.contains(Flags::READ_DISCONNECT) {
read_available(&mut inner.io, &mut inner.read_buf)?
} else {
None
};
inner.poll_request()?;
if let Some(true) = should_disconnect {

View file

@ -156,4 +156,4 @@ pub fn patch(args: TokenStream, input: TokenStream) -> TokenStream {
let args = parse_macro_input!(args as syn::AttributeArgs);
let gen = route::Args::new(&args, input, route::GuardType::Patch);
gen.generate()
}
}

View file

@ -29,7 +29,7 @@ pub enum GuardType {
Connect,
Options,
Trace,
Patch
Patch,
}
impl fmt::Display for GuardType {

View file

@ -1,7 +1,7 @@
use actix_http::HttpService;
use actix_http_test::TestServer;
use actix_web::{http, web::Path, App, HttpResponse, Responder};
use actix_web_codegen::{delete, get, post, put, patch, head, connect, options, trace};
use actix_web_codegen::{connect, delete, get, head, options, patch, post, put, trace};
use futures::{future, Future};
#[get("/test")]