mirror of https://github.com/rwf2/Rocket.git
Emit a helpful error when 'LocalRequest' is malformed.
This commit is contained in:
parent
4010a967a6
commit
7abfaafcf9
|
@ -397,6 +397,7 @@ impl<'c> LocalRequest<'c> {
|
|||
if let Ok(uri) = Origin::parse(uri) {
|
||||
request.set_uri(uri.into_owned());
|
||||
} else {
|
||||
error!("Malformed request URI: {}", uri);
|
||||
let res = client.rocket().handle_error(Status::BadRequest, request);
|
||||
return LocalResponse { _request: owned_request, response: res };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue