mirror of https://github.com/fafhrd91/actix-web
Minor tweaks to match new signature
This commit is contained in:
parent
a992de888e
commit
1c8c860e7d
|
|
@ -289,7 +289,7 @@ impl<T> UrlEncoded<T> {
|
||||||
/// Create a new future to decode a URL encoded request payload.
|
/// Create a new future to decode a URL encoded request payload.
|
||||||
pub fn new(req: &HttpRequest, payload: &mut Payload) -> Self {
|
pub fn new(req: &HttpRequest, payload: &mut Payload) -> Self {
|
||||||
// check content type
|
// check content type
|
||||||
if req.content_type().to_lowercase() != "application/x-www-form-urlencoded" {
|
if req.content_type() != Some("application/x-www-form-urlencoded") {
|
||||||
return Self::err(UrlencodedError::ContentType);
|
return Self::err(UrlencodedError::ContentType);
|
||||||
}
|
}
|
||||||
let encoding = match req.encoding() {
|
let encoding = match req.encoding() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue