Minor tweaks to match new signature

This commit is contained in:
Vinicius Buzzacaro 2025-11-10 21:41:08 -03:00
parent a992de888e
commit 1c8c860e7d
1 changed files with 1 additions and 1 deletions

View File

@ -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() {