Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31697

HistoryServer should set Content-Type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.0
    • 3.0.0
    • Web UI
    • None

    Description

      I noticed that we will get html as plain text when we access to wrong URLs on HistoryServer.

      <html>
            <head>
              <meta http-equiv="Content-type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/static/bootstrap.min.css" type="text/css"/><link rel="stylesheet" href="/static/vis-timeline-graph2d.min.css" type="text/css"/><link rel="stylesheet" href="/static/webui.css" type="text/css"/><link rel="stylesheet" href="/static/timeline-view.css" type="text/css"/><script src="/static/sorttable.js"></script><script src="/static/jquery-3.4.1.min.js"></script><script src="/static/vis-timeline-graph2d.min.js"></script><script src="/static/bootstrap.bundle.min.js"></script><script src="/static/initialize-tooltips.js"></script><script src="/static/table.js"></script><script src="/static/timeline-view.js"></script><script src="/static/log-view.js"></script><script src="/static/webui.js"></script><script>setUIRoot('')</script>
              
              <link rel="shortcut icon" href="/static/spark-logo-77x50px-hd.png"></link>
              <title>Not Found</title>
            </head>
            <body>
              <div class="container-fluid">
                <div class="row">
                  <div class="col-12">
                    <h3 style="vertical-align: middle; display: inline-block;">
                      <a style="text-decoration: none" href="/">
                        <img src="/static/spark-logo-77x50px-hd.png"/>
                        <span class="version" style="margin-right: 15px;">3.1.0-SNAPSHOT</span>
                      </a>
                      Not Found
                    </h3>
                  </div>
                </div>
                <div class="row">
                  <div class="col-12">
                    <div class="row">Application local-1589239 not found.</div>
                  </div>
                </div>
              </div>
            </body>
          </html> 

       

      The reason is Content-Type not set.

      HTTP/1.1 404 Not Found
      Date: Wed, 13 May 2020 06:59:29 GMT
      Cache-Control: no-cache, no-store, must-revalidate
      X-Frame-Options: SAMEORIGIN
      X-XSS-Protection: 1; mode=block
      X-Content-Type-Options: nosniff
      Content-Length: 1778
      Server: Jetty(9.4.18.v20190429) 

      Attachments

        Activity

          People

            sarutak Kousuke Saruta
            sarutak Kousuke Saruta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: