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

Batch requests fail whenEntity's key contains space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • (Java) V4 4.7.1
    • None
    • odata4-server
    • None

    Description

      Batch requests fail if the status line contains an entity's key containing a whitespace.

       

      HttpRequestStatusLine splits the status line by ' ', which incorrectly splits up the entity's key.

      https://github.com/apache/olingo-odata4/blob/master/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/HttpRequestStatusLine.java#L61

       

      This results in the following error:

      org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException: Invalid status line
      	at org.apache.olingo.server.core.deserializer.batch.HttpRequestStatusLine.parse(HttpRequestStatusLine.java:70)
      	at org.apache.olingo.server.core.deserializer.batch.HttpRequestStatusLine.<init>(HttpRequestStatusLine.java:57)
      	at org.apache.olingo.server.core.deserializer.batch.BatchRequestTransformator.createRequest(BatchRequestTransformator.java:103)
      	at org.apache.olingo.server.core.deserializer.batch.BatchRequestTransformator.processQueryOperation(BatchRequestTransformator.java:68)
      	at org.apache.olingo.server.core.deserializer.batch.BatchRequestTransformator.transform(BatchRequestTransformator.java:52)
      
      

      With batch request body:

      --batch_id-1602680016103-62
      Content-Type:application/http
      Content-Transfer-Encoding:binary
      
      GET EcmServers('test test')?$expand=Properties HTTP/1.1
      Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
      Accept-Language:en-US
      Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
      
      --batch_id-1602680016103-62
      Content-Type:application/http
      Content-Transfer-Encoding:binary
      
      GET EcmServers('test test')?$expand=Properties HTTP/1.1
      Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
      Accept-Language:en-US
      Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
      
      --batch_id-1602680016103-62--
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            tobias-- Tobias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: