profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/tobiasso85/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

tobiasso85/intelligent-h2 1

intelligent h2 server

tobiasso85/xmldom 1

A PURE JS W3C Standard based(XML DOM Level2 CORE) DOMParser and XMLSerializer.

tobiasso85/eslint-plugin-openui5 0

Openui5 plugins for eslint

tobiasso85/node-unzip-2 0

node.js cross-platform unzip using streams

tobiasso85/openui5-sample-app 0

OpenUI5 Sample App

tobiasso85/openui5-website 0

The OpenUI5 website.

tobiasso85/ui5-webcomponents-sample-react 0

UI5 Web Components Sample TODO application built with React.

tobiasso85/ui5con2019-service-worker-slides 0

Slides for ui5-service-worker

pull request commentSAP/openui5

[FIX] sap.ui.model.odata: add request header "X-Requested-With"

Hi @tobiasso85,

Since the default $.ajax behavior is only valid for same-origin requests the Plunkr was a bad example of course. I am perfectly OK with having to set custom headers for CORS requests. My real-world issue was raised from a same-origin scenario.

So if I get this right, this means at the moment UI5 strips away (or initializes the full headers array) the default present header from the XHR in a same-origin scenario and this is what will be reinstated?

Regards,

Pieter

Hi Pieter,

I don't know if I get your question right; in OData V2, it will set this header (if not already set) in the same-origin scenario (Behaviour like OData V4).

Regards Tobias

piejanssens

comment created time in 22 days

pull request commentSAP/openui5

[FIX] sap.ui.model.odata: add request header "X-Requested-With"

Hi @piejanssens ,

after quite some discussions we decided not against this change, but instead only take parts of it; this means we will align the behaviour of OData v2 and v4 such that the X-Requested-With Header only gets sent for non-cross origin requests. This way we follow the jQuery way, because we do not know the server landscape. When using this header in a cross origin scenario unnecessary pre-flight requests could be the result and these we want to avoid.

The header can still be set manually though as part of the ODataModel configuration (e.g. in the manifest):

  • V2 field: headers
    • https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel%23overview
  • V4 field: httpHeaders
    • https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v4.ODataModel%23overview

Regards Tobias

piejanssens

comment created time in 22 days

PullRequestReviewEvent

pull request commentSAP/openui5

[FIX] sap.ui.model.odata: add request header "X-Requested-With"

Since there is already a test for the constructor, and the constructor code is modified, I would have expected something like:

assert.deepEqual(oModel.oHeaders, {
	"Accept": "application/json",
	"Accept-Language": sap.ui.getCore().getConfiguration().getLanguageTag(),
	"DataServiceVersion": "2.0",
	"MaxDataServiceVersion": "2.0",
	"sap-contextid-accept": "header",
	"X-Requested-With": "XMLHttpRequest"
});

https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js#L110 (at the end of this test)

piejanssens

comment created time in a month

PullRequestReviewEvent

pull request commentSAP/openui5

[FIX] sap.ui.model.odata: add request header "X-Requested-With"

Hi @piejanssens ,

thanks for this contribution. The code looks good, but the tests need to be adjusted such that it runs through. We require unit as well as integration tests.

  • ODataModel (v2) constructor Unit test

    • https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js#L110
      • [ ] check oHeaders
  • ODataModel (v2) integration test

    • https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js#L846
      • [ ] delete X-Requested-With header
  • Requestor (v4) Unit test

    • https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js
      • [ ] fix tests
  • Requestor (v2) Unit test

    • https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/lib/_V2Requestor.qunit.js
      • [ ] fix tests

Regards Tobias

piejanssens

comment created time in a month

delete branch SAP-samples/ui5-service-worker-sample

delete branch : update-dependencies

delete time in 2 months

push eventSAP-samples/ui5-service-worker-sample

Tobias Sorn

commit sha 3760f7e263c6573c5fb2655864b322866e712369

[INTERNAL] Update dependencies (#11) Update dependencies for security reasons

view details

push time in 2 months

PR merged SAP-samples/ui5-service-worker-sample

[INTERNAL] Update dependencies

Update dependencies for security reasons

+2887 -648

0 comment

2 changed files

tobiasso85

pr closed time in 2 months

issue commentSAP/openui5

sap.ui.Device.system.desktop not set correctly

Hello @vtebano13,

Thank you for sharing this finding and providing more information. I've created an internal incident 2180251677. The status of the issue will be updated here in GitHub.

Regards, Tobias

vtebano13

comment created time in 3 months