From 4b271f3f64ce334767b8ff10d19abc402a1838b3 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Thu, 4 Dec 2014 12:48:16 +0900 Subject: [PATCH] rustdoc: Preserve query/fragment in redirects whenever possible. We heavily rely on queries and fragments in the URL structure, so it is desired to preserve them even in the redirects. The generated redirect pages try to preserve them with scripts, which take precedence over the original `Refresh` metadata. Non-scripting browsers would continue to work (with no queries and fragments). --- src/librustdoc/html/layout.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 896d070c155ee..23f31580619ee 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -160,6 +160,7 @@ r##" } pub fn redirect(dst: &mut io::Writer, url: &str) -> io::IoResult<()> { + // "##, url = url,