Skip to content

Commit

Permalink
Merge pull request http-rs#537 from http-rs/no-self-in-return
Browse files Browse the repository at this point in the history
Update Request to latest http-types
  • Loading branch information
yoshuawuyts authored May 24, 2020
2 parents 27310f9 + c4d4732 commit f884167
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async-h1 = { version = "2.0.0", optional = true }
async-sse = "2.1.0"
async-std = { version = "1.6.0", features = ["unstable"] }
femme = "2.0.1"
http-types = "2.0.0"
http-types = "2.0.1"
kv-log-macro = "1.0.4"
mime = "0.3.14"
mime_guess = "2.0.3"
Expand Down
2 changes: 1 addition & 1 deletion src/cookies/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<State: Send + Sync + 'static> Middleware<State> for CookiesMiddleware {
let cookie_data = CookieData::from_request(&ctx);
// no cookie data in ext context, so we try to create it
let content = cookie_data.content.clone();
ctx = ctx.set_ext(cookie_data);
ctx.set_ext(cookie_data);
content
};

Expand Down
2 changes: 1 addition & 1 deletion src/fs/serve_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl ServeDir {

impl<State> Endpoint<State> for ServeDir {
fn call<'a>(&'a self, req: Request<State>) -> BoxFuture<'a, Result> {
let path = req.uri().path();
let path = req.url().path();
let path = path.trim_start_matches(&self.prefix);
let path = path.trim_start_matches('/');
let mut file_path = self.dir.clone();
Expand Down
2 changes: 1 addition & 1 deletion src/log/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl LogMiddleware {
ctx: Request<State>,
next: Next<'a, State>,
) -> crate::Result {
let path = ctx.uri().path().to_owned();
let path = ctx.url().path().to_owned();
let method = ctx.method().to_string();
log::info!("<-- Request received", {
method: method,
Expand Down
Loading

0 comments on commit f884167

Please sign in to comment.