mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
Fix panic on invalid URL characters #130
This commit is contained in:
@ -126,7 +126,7 @@ impl HttpResponseParser {
|
||||
let mut resp = httparse::Response::new(&mut headers);
|
||||
match resp.parse(b)? {
|
||||
httparse::Status::Complete(len) => {
|
||||
let version = if resp.version.unwrap() == 1 {
|
||||
let version = if resp.version.unwrap_or(1) == 1 {
|
||||
Version::HTTP_11
|
||||
} else {
|
||||
Version::HTTP_10
|
||||
|
Reference in New Issue
Block a user