Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/5792#discussion_r30265122
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
@@ -104,6 +108,52 @@ class HistoryServer(
initialize()
+ private[spark] class HistoryServlet(val appId: String) extends
HttpServlet {
+
+ // SPARK-5983 ensure TRACE is not supported
+ protected override def doTrace(req: HttpServletRequest, res:
HttpServletResponse): Unit = {
+ res.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED)
+ }
+
+ protected override def doGet(req: HttpServletRequest, res:
HttpServletResponse): Unit = {
+ try {
--- End diff --
I guess you should probably check the accept headers of the request, that
they are OK w/ application/zip:
`req.getHeader(HttpHeaders.ACCEPT)`. You could check w/ guava's
`MediaType#is` (I couldn't find a simpler way ...)
```
val accepts = MediaType.parse(req.getHeader(HttpHeaders.ACCEPT))
if (MediaType.ZIP.is(accepts)) {
...
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]