You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Tobias (Jira)" <ji...@apache.org> on 2020/10/15 10:58:00 UTC

[jira] [Closed] (OLINGO-1486) Batch requests fail whenEntity's key contains space

     [ https://issues.apache.org/jira/browse/OLINGO-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias closed OLINGO-1486.
--------------------------
    Resolution: Invalid

After checking the odata specification, I come to the conclusion that the URL has not been properly URL encoded.

> Batch requests fail whenEntity's key contains space
> ---------------------------------------------------
>
>                 Key: OLINGO-1486
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1486
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.7.1
>            Reporter: Tobias
>            Priority: Major
>
> 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:
> {code:java}
> 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)
> {code}
> With batch request body:
> {code:java}
> --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--
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)