-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oData v4 not working after upgrade to 1.54 #2014
Comments
Hello @hschaefer123 ! According to the ABNF, Northwind is wrong here. The spec clearly states that the OData version must be "4.0" w/o a trailing semicolon. We are trying to contact someone from Microsoft to get this issue fixed. Thanks a lot for using OData V4 and pointing out this issue. Sorry for any inconvenience caused. Best regards, ;------------------------------------------------------------------------------ header = content-id content-id = "Content-ID" COLON OWS 1*unreserved odata-entityid = "OData-EntityID" COLON OWS IRI-in-header |
@ThomasChadzelek any update here? This is even a problem when using Snippix to reproduce errors, so it could really help. Also it wouldn't really hurt to make UI5 a little more error tolerant, so allowing the ; . In the end it doesn't really matter where it is "fixed", but for testing things out, northwind is the standard and that doesn't work currently. I would even take a code snippet from your side that overwrites the function that checks for "4.0", I wasn't really able to figure out how. But when I stop there with a debugger and overwrite the variable that contains "4.0;" with "4.0" then everything works fine. |
Hello @philippthiele ! Sorry, but we adhere to the spec. Northwind is also broken in other ways, we cannot work around all of that. If you test with Northwind and run into other issues, how would you know if UI5 is wrong or Northwind is wrong? I really suggest to test with a compliant service, that should make your life and our life easier. We apologize for any inconvenience caused. Best regards, |
Hi @ThomasChadzelek , ok sure, that is also a possibility, but I was not able to find an open compliant service which I can use to send examples to other people, could you point me and potentially others reading this to such a service? Thanks and BR |
As a Dutchman I embrace John Postel's Robustness Principle, "Be conservative in what you send, be liberal in what you accept". Thanks to this quality the internet is much better. Best regards |
Hello @SeriousSoftware ! I appreciate Mr. Postel's idea and I am much in favor of robustness, but there is also some criticism for "Postel's law". It is not a simple decision. Fail-fast is also a nice idea. @philippthiele I would recommend to use TripPin. Best regards, |
Hint: go to https://www.odata.org/ > Developers > Reference Services :-) |
OpenUI5 version: 1.54.3
(CacheBuster is using SAPUI5 for demonstration SCP Feature and running on SCP /resource, but the issue will be the same ;-)
Browser/version (+device/version): Chrome
Any other tested browsers/devices(OK/FAIL): no
URL (minimal example if possible):
https://cachebuster-p1940953245trial.dispatcher.hanatrial.ondemand.com/index.html
Steps to reproduce the problem:
The issues directly thrown during load so no additional task here
What is the expected result?
Loading oData model with products and displaying as list
What happens instead? console log error:
Failed to get contexts for /V4/Northwind/Northwind.svc/Products with start index 0 and length 100 - Error: Expected 'OData-Version' header with value '4.0' but received value '4.0;' in response for /V4/Northwind/Northwind.svc/Products?$skip=0&$top=100
Have a look at received value comparisation and the trailing ";" inside comparator!!!
"4.0" !== "4.0;" ;-)
The text was updated successfully, but these errors were encountered: