diff --git a/src/extractors.rs b/src/extractors.rs index bb366f1..f7a3de6 100644 --- a/src/extractors.rs +++ b/src/extractors.rs @@ -60,6 +60,7 @@ where .to_str() .ok() .and_then(|url| url.parse::().ok()); + return Ok(HxCurrentUrl(url)); } diff --git a/src/responders/location.rs b/src/responders/location.rs index 39b5a7d..c7ff3ca 100644 --- a/src/responders/location.rs +++ b/src/responders/location.rs @@ -83,6 +83,7 @@ impl HxLocation { path: self.uri.to_string(), opts: self.options, }; + Ok(serde_json::to_string(&loc_with_opts)?) } } diff --git a/src/responders/trigger.rs b/src/responders/trigger.rs index e96440b..393d1a0 100644 --- a/src/responders/trigger.rs +++ b/src/responders/trigger.rs @@ -57,6 +57,7 @@ fn events_to_header_value(events: Vec) -> Result>() .join(", "); + http::HeaderValue::from_str(&header).map_err(Into::into) }