SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.24k forks source link

oData v4 in SAPUI5 #2830

Closed siasty closed 4 years ago

siasty commented 4 years ago

OpenUI5 version: each version

Browser/version (+device/version): each browser

URL: https://demo.hgs3.pl/odata

I'm trying to create a sample application in WebIde with oData v4. I made my own oData service in dotnet and created an application from a template, but it does not work in batch. I am getting this problem (see photo). obraz

I tried with Northwind odata v4 and it's the same. Everything works fine when I use no batch mode.

batch request also return OK obraz

Does any one have done it before? Any idea what is wrong?

uhlmannm commented 4 years ago

Hi @siasty ,

the error message tells that the request was not executed because another request failed. The batch request you show in the screenshot has only a successful response, though. Is there a failed OData request?

Best regards Mathias.

siasty commented 4 years ago

Hi @uhlmannm thanks for the quick response I don't see that there are wrong queries in web browser the app is at https://demo.hgs3.pl [ login Admin/Th9S38vk@@ ] maybe you'll see something

Best regards

d3xter666 commented 4 years ago

Hello @siasty ,

Thank you for sharing this finding. I've created an internal incident #2070043116. The status of the issue will be updated here in GitHub.

Cheers

uhlmannm commented 4 years ago

Hi Maciej (@siasty ),

the issue seems to be with the response. Let me start with https://www.ietf.org/rfc/rfc2046.txt:

5.1.1. Common Syntax ... The boundary delimiter line is then defined as a line consisting entirely of two hyphen characters ("-", decimal value 45) followed by the boundary parameter value from the Content-Type header field, optional linear whitespace, and a terminating CRLF.

When checking in _Batch, function _deserializeBatchResponse I observe that the first boundary is not detected. This is because the CR (ASCII 13, \r) is missing. You can check yourself by setting a breakpoint in the mentioned function. In my cases sResponseBody.charCodeAt(52) shows the LF (ASCII 10, \n). sResponseBody.charCodeAt(51) does not return 13 as sResponseBody[51] is the last character of the boundary, e.g. 6.

Could you please check why your service is not returning the CR as specified in RFC2046?

Best regards Mathias.

siasty commented 4 years ago

Hi, Thanks a lot, I had no idea. I will try to find out why CR is missing and I will let you knowi.

Best Regard Maciej

uhlmannm commented 4 years ago

Hi Maciej,

I will close the issue. Please reopen it if further investigation from model side is required!

Best regards Mathias.