We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00ba0b2 commit 1d3d23aCopy full SHA for 1d3d23a
src/web/routes.rs
@@ -283,12 +283,10 @@ impl Handler for SimpleRedirect {
283
struct PermanentRedirect(&'static str);
284
285
impl Handler for PermanentRedirect {
286
- fn handle(&self, req: &mut iron::Request) -> iron::IronResult<iron::Response> {
287
- let mut url: iron::url::Url = req.url.clone().into();
288
- url.set_path(self.0);
+ fn handle(&self, _req: &mut iron::Request) -> iron::IronResult<iron::Response> {
289
Ok(iron::Response::with((
290
iron::status::MovedPermanently,
291
- iron::modifiers::Redirect(iron::Url::from_generic_url(url).unwrap()),
+ iron::modifiers::RedirectRaw(self.0.to_owned()),
292
)))
293
}
294
0 commit comments