Skip to content
Snippets Groups Projects
Commit fdb38227 authored by Rohit Agarwal's avatar Rohit Agarwal Committed by Andrew Or
Browse files

[SPARK-12186][WEB UI] Send the complete request URI including the query string when redirecting.

Author: Rohit Agarwal <rohita@qubole.com>

Closes #10180 from mindprince/SPARK-12186.
parent f590178d
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,9 @@ class HistoryServer( ...@@ -103,7 +103,9 @@ class HistoryServer(
// Note we don't use the UI retrieved from the cache; the cache loader above will register // 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 // 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. // 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 // SPARK-5983 ensure TRACE is not supported
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment