Return-Path: X-Original-To: apmail-spark-commits-archive@minotaur.apache.org Delivered-To: apmail-spark-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EEA7F18BD2 for ; Thu, 17 Dec 2015 03:04:46 +0000 (UTC) Received: (qmail 82497 invoked by uid 500); 17 Dec 2015 03:04:46 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 82461 invoked by uid 500); 17 Dec 2015 03:04:46 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 82451 invoked by uid 99); 17 Dec 2015 03:04:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2015 03:04:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 46B84DFCF2; Thu, 17 Dec 2015 03:04:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: andrewor14@apache.org To: commits@spark.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [SPARK-12186][WEB UI] Send the complete request URI including the query string when redirecting. Date: Thu, 17 Dec 2015 03:04:46 +0000 (UTC) Repository: spark Updated Branches: refs/heads/branch-1.6 4af64385b -> 154567dca [SPARK-12186][WEB UI] Send the complete request URI including the query string when redirecting. Author: Rohit Agarwal Closes #10180 from mindprince/SPARK-12186. (cherry picked from commit fdb38227564c1af40cbfb97df420b23eb04c002b) Signed-off-by: Andrew Or Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/154567dc Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/154567dc Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/154567dc Branch: refs/heads/branch-1.6 Commit: 154567dca126d4992c9c9b08d71d22e9af43c995 Parents: 4af6438 Author: Rohit Agarwal Authored: Wed Dec 16 19:04:33 2015 -0800 Committer: Andrew Or Committed: Wed Dec 16 19:04:43 2015 -0800 ---------------------------------------------------------------------- .../scala/org/apache/spark/deploy/history/HistoryServer.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/154567dc/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala b/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala index d4f327c..f31fef0 100644 --- a/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala +++ b/core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala @@ -103,7 +103,9 @@ class HistoryServer( // Note we don't use the UI retrieved from the cache; the cache loader above will register // the app's UI, and all we need to do is redirect the user to the same URI that was // requested, and the proper data should be served at that point. - res.sendRedirect(res.encodeRedirectURL(req.getRequestURI())) + // Also, make sure that the redirect url contains the query string present in the request. + val requestURI = req.getRequestURI + Option(req.getQueryString).map("?" + _).getOrElse("") + res.sendRedirect(res.encodeRedirectURL(requestURI)) } // SPARK-5983 ensure TRACE is not supported --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org