mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-22 20:23:09 +00:00
don't unwrap when fullstack fails to get the path and query information from the request (#2578)
This commit is contained in:
parent
4cab834640
commit
9bf46968cd
1 changed files with 5 additions and 1 deletions
|
@ -381,7 +381,11 @@ pub async fn render_handler(
|
|||
let build_virtual_dom = state.build_virtual_dom.clone();
|
||||
|
||||
let (parts, _) = request.into_parts();
|
||||
let url = parts.uri.path_and_query().unwrap().to_string();
|
||||
let url = parts
|
||||
.uri
|
||||
.path_and_query()
|
||||
.ok_or(StatusCode::BAD_REQUEST)?
|
||||
.to_string();
|
||||
let parts: Arc<parking_lot::RwLock<http::request::Parts>> =
|
||||
Arc::new(parking_lot::RwLock::new(parts));
|
||||
let server_context = DioxusServerContext::from_shared_parts(parts.clone());
|
||||
|
|
Loading…
Reference in a new issue