aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2015-02-10 20:19:14 -0800
committerAndrew Or <andrew@databricks.com>2015-02-10 20:19:14 -0800
commitb969182659aa7ea94c38329b86d98a31b23efce8 (patch)
treedeab21e17238e3433550adab932979f4a637f46b
parent1cb37700753437045b15c457b983532cd5a27fa5 (diff)
downloadspark-b969182659aa7ea94c38329b86d98a31b23efce8.tar.gz
spark-b969182659aa7ea94c38329b86d98a31b23efce8.tar.bz2
spark-b969182659aa7ea94c38329b86d98a31b23efce8.zip
[SPARK-5729] Potential NPE in standalone REST API
If the user specifies a bad REST URL, the server will throw an NPE instead of propagating the error back. This is because the default `ErrorServlet` has the wrong prefix. This is a one line fix. I am will add more comprehensive tests in a separate patch. Author: Andrew Or <andrew@databricks.com> Closes #4518 from andrewor14/rest-npe and squashes the following commits: 16b15bc [Andrew Or] Correct ErrorServlet context prefix
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala b/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
index 6e4486e20f..acd3a2b5ab 100644
--- a/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
@@ -77,7 +77,7 @@ private[spark] class StandaloneRestServer(
new SubmitRequestServlet(masterActor, masterUrl, masterConf) -> s"$baseContext/create/*",
new KillRequestServlet(masterActor, masterConf) -> s"$baseContext/kill/*",
new StatusRequestServlet(masterActor, masterConf) -> s"$baseContext/status/*",
- new ErrorServlet -> "/" // default handler
+ new ErrorServlet -> "/*" // default handler
)
/** Start the server and return the bound port. */