diff --git a/src/actix.rs b/src/actix.rs
index d16e612..4f4bfe2 100644
--- a/src/actix.rs
+++ b/src/actix.rs
@@ -12,10 +12,12 @@
//! }
//! ```
//!
-use std::io;
-
-use std::pin::Pin;
-use std::task::{Context, Poll};
+use std::{
+ convert::TryInto,
+ io,
+ pin::Pin,
+ task::{Context, Poll},
+};
use actix_web::body::BoxBody;
use actix_web::error::PayloadError;
@@ -45,11 +47,11 @@ impl FromRequest for DavRequest {
fn from_request(req: &HttpRequest, payload: &mut dev::Payload) -> Self::Future {
let mut builder = http::Request::builder()
- .method(req.method().to_owned())
- .uri(req.uri().to_owned())
- .version(req.version().to_owned());
+ .method(req.method().as_ref())
+ .uri(req.uri().to_string())
+ .version(from_actix_http_version(req.version()));
for (name, value) in req.headers().iter() {
- builder = builder.header(name, value);
+ builder = builder.header(name.as_str(), value.as_ref());
}
let path = req.match_info().unprocessed();
let tail = req.match_info().unprocessed();
@@ -82,29 +84,20 @@ impl http_body::Body for DavBody {
type Data = Bytes;
type Error = io::Error;
- fn poll_data(
+ fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
- ) -> Poll