Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1303 seamless https/http support in HST through scheme on SiteMapItem level
  3. HSTTWO-2494

Support the request to be short circuited or continued when the request scheme is different than the scheme configured on the mount or sitemap item

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.26.02
    • None

    Description

      Currently, you can already set the property 'hst:scheme' on hosts. host, mount or sitemapitem. There are also getScheme() getters. However, the HST does not do anything with it.
      I will introduce a new property
      ,

      • hst:schemenotmatchresponsecode (long)

      that can be used to define the servlet response code that the hst should invoke when the scheme from the servlet request does not match the configured scheme. The following hst:schemenotmatchresponsecode's are now supported:

      HttpServletResponse.SC_OK: // just continue;
      HttpServletResponse.SC_MOVED_PERMANENTLY :
      res.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
      // create fully qualified redirect to scheme from sitemap item
      res.setHeader("Location", getFullyQualifiedURLforScheme(hstSiteMapItem.getScheme(), resolvedSiteMapItem.getResolvedMount().getMount(), req));
      HttpServletResponse.SC_MOVED_TEMPORARILY:
      // create fully qualified redirect to scheme from sitemap item
      res.sendRedirect(getFullyQualifiedURLforScheme(hstSiteMapItem.getScheme(), resolvedSiteMapItem.getResolvedMount().getMount(), req));

      HttpServletResponse.SC_NOT_FOUND:
      sendError(req, res, HttpServletResponse.SC_NOT_FOUND);

      HttpServletResponse.SC_FORBIDDEN:
      sendError(req, res, HttpServletResponse.SC_FORBIDDEN);

      Attachments

        Issue Links

          Activity

            People

              svoortman Simon Voortman (Inactive)
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: