Wink
  1. Wink
  2. WINK-104

handle q=0 on Accept http header

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1
    • Fix Version/s: 0.1
    • Component/s: Server
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      HTTP Accept header can have q=0 quality factor. This indicates that the server should NOT send out that encoding.

      Please see patch for tests and possible solution. I will say, however, that I don't particularly like the solution. It's readable, and it works, but it's part of some filtering code that I think could be and should be optimized.

      To whomever commits this, please open a followup Jira to optimize that filtering code patch in ResourceRegistry.

      If you change the solution significantly, please email me or I'll check the Jira periodically to see if any updated patches were posted. I'm curious to see the solution(s) and learn how I can make your job easier.

      1. WINK-104.patch
        18 kB
        Mike Rheinheimer

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Wink-Trunk-JDK1.5 #15 (See http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5/15/)
          handle q=0 on Accept http header
          See []

          Show
          Hudson added a comment - Integrated in Wink-Trunk-JDK1.5 #15 (See http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5/15/ ) handle q=0 on Accept http header See []
          Hide
          Michael Elman added a comment -

          Fixed it.
          I needed to modify some of the unit tests, please see and tell me if you are agree with the changes.

          There was a unit test under "TODO". I don't think that it should work. In this unit test the user returns explicit Response object with the defined media type. According to spec, the implementation should not interfere user defined type. see 3.8.1.

          Show
          Michael Elman added a comment - Fixed it. I needed to modify some of the unit tests, please see and tell me if you are agree with the changes. There was a unit test under "TODO". I don't think that it should work. In this unit test the user returns explicit Response object with the defined media type. According to spec, the implementation should not interfere user defined type. see 3.8.1.
          Hide
          Mike Rheinheimer added a comment -

          patch can be applied at wink-server

          Show
          Mike Rheinheimer added a comment - patch can be applied at wink-server

            People

            • Assignee:
              Michael Elman
              Reporter:
              Mike Rheinheimer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development