javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-272

Accept should prefer application/xml+xhtml over text/html when those two accept have with same "q" (preference) level

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 1.2_01-b01
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      272
    • Status Whiteboard:
      Hide

      backport_1_1

      Show
      backport_1_1

      Description

      When presented a list of supported content type with equals preferences (for
      instance "text/html, application/xhtml+xml" ) the "application/xml+xhtml" should
      be prefered to conform to http://www.w3.org/TR/xhtml-media-types/ when sending
      XHTML.

      The current version of JSF RenderKitImpl match preffer to return text/html.

      An example of such an that Opera 8.51 send :

      Accept: application/xhtml+voice+xml;version=1.2,
      application/x-xhtml+voice+xml;version=1.2, text/html, application/xml;q=0.9,
      application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, /;q=0.1

      Then here we have returned text/html and not application/xhtml+xml that are two
      equaly possible solution. JSF should have chosen the later one which is a better
      indication and more standard friendly solution.

      In my application, because facelets still not conform to HTML compatibility
      guidelines for XHTML (http://www.w3.org/TR/xhtml1/guidelines.html) I have to
      bring a extra filter for content type text/html stream returned by JSF/Facelet
      to "legacy-enable" the page. In this scenario, and because of this issue, this
      means for instance that Opera user will also be applied this process (which is
      not required because their browser is fully XHTML compatible).

      Fixing this issue will hence improve global JSF standard compliance.

      1. changebundle.txt
        11 kB
        rogerk

        Activity

        Hide
        Ed Burns added a comment -

        RK> + // If the negotiated content type (the client preferred type) is
        RK> + // "application/xhtml+xml" "preferXHTML" must be true as well.
        RK> + // A value of "true" for "preferXHTML" signifies that the page author
        RK> + // /developer has asserted that the entire page is XHTML compliant
        RK> + // (at least transitional).

        This seems like a behavior change that may break some apps. I think we
        should assume that the developer is making correct markup.

        Show
        Ed Burns added a comment - RK> + // If the negotiated content type (the client preferred type) is RK> + // "application/xhtml+xml" "preferXHTML" must be true as well. RK> + // A value of "true" for "preferXHTML" signifies that the page author RK> + // /developer has asserted that the entire page is XHTML compliant RK> + // (at least transitional). This seems like a behavior change that may break some apps. I think we should assume that the developer is making correct markup.
        Hide
        rogerk added a comment -

        The more I thought about it, the more I felt that this was a hack.
        I think it really is up to the page author/application developer
        to ensure that their pages are compliant.

        Show
        rogerk added a comment - The more I thought about it, the more I felt that this was a hack. I think it really is up to the page author/application developer to ensure that their pages are compliant.
        Hide
        Ryan Lubke added a comment -

        Reopening

        Show
        Ryan Lubke added a comment - Reopening
        Hide
        Ryan Lubke added a comment -

        Setting resolution at fixed.

        Show
        Ryan Lubke added a comment - Setting resolution at fixed.
        Hide
        Manfred Riem added a comment -

        Closing issue out

        Show
        Manfred Riem added a comment - Closing issue out

          People

          • Assignee:
            rogerk
            Reporter:
            bjb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: