Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3897

Better handling on invalid JAXRS '_type' parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.3.7, 2.4.3, 2.5
    • 2.3.8, 2.4.5, 2.5.1
    • None
    • None
    • Unknown

    Description

      From the discussion on the user list:

      > From: Sergey Beryozkin <sberyozkin@gmail.com>
      > To: users@cxf.apache.org
      > Cc:
      > Sent: Tuesday, November 8, 2011 4:44 PM
      > Subject: Re: No warning on invalid _type parameter
      >
      > Hi
      > On 08/11/11 19:41, Woonsan Ko wrote:
      >> Hi,
      >>
      >> When an undefined _type parameter is used for JAX-RS requests (e.g.,
      > ?_type=foo), it doesn't give any warning logs. It just returns 406 http
      > error code.
      > Enabling the fine logging should tell that no Accept header was matched...
      >> It seems better to give a proper warning log in
      > o.a.cxf.jaxrs.impl.RequestPreprocessor#handleTypeQuery() method in that case.
      >> Also, it currently uses the invalid type as Accept header even though
      > there's no shortcut registered for the type parameter value.
      >
      > Agreed - it's a bug
      >
      >> Shall I create an JIRA issue with a patch for this?
      >>
      > Yes please, thanks
      > Sergey
      >
      >> Kind regards,
      >>
      >> Woonsan
      >

      Attachments

        1. CXF-3897.patch
          2 kB
          Woonsan Ko

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            woon_san Woonsan Ko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: