Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-15915

Set default view to request header 'Accept' value

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.x, 2.6.x, 2.7.0
    • Fix Version/s: 2.7.0, 2.8.0
    • Component/s: Entity Broker
    • Labels:
      None

      Description

      If a request to the entity provider does not contain an extension, the view will be defaulted to 'html'.
      It should be changed to that the request header is checked for an 'Accept' entry. If such entry can be found,
      the view extension should be set to the header value, or to 'html' is the header entry is missing.

      for (Enumeration<String> enumHeader = req.getHeaderNames(); enumHeader.hasMoreElements() {
      String headerName = enumHeader.nextElement();
      if (headerName.equalsIgnoreCase("accept"))

      { view.setExtension(req.getHeader("accept")); break; }

      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  aaronz Aaron Zeckoski (Inactive)
                  Reporter:
                  tbehlau Thomas Behlau (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code