Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1107

UriDecoder should use java.net.URLDecoder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • (Java) V4 4.3.0
    • (Java) V4 4.4.0
    • odata4-server
    • None

    Description

      Query filters are incorrectly parsed, because the org.apache.olingo.commons.core.Decoder doesn't convert '+' to space.

      Simple fix is to use java.net.URLDecoder instead (line 85):

      return URLDecoder.decode(encoded, "UTF-8");

      Additional unit test:

        @Test
        public void decodePlusAsSpace() throws Exception{
      	  checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", "PaymentStatus eq 'Cleared'");
        }
      

      Attachments

        Activity

          People

            rareddy Ramesh Reddy
            jonmcewen Jon McEwen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: