From d0ba894e2d79f7d42a8f9fefa56df8547dbf064b Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 5 Aug 2020 18:59:16 +0200 Subject: [PATCH] apply new license headers in new code --- scripts/build.mjs | 1 + src/main-legacy.js | 17 +++++++++++++++++ src/matrix/net/request/fetch.js | 1 + src/matrix/net/request/xhr.js | 18 +++++++++++++++++- src/matrix/net/timeout.js | 19 ++++++++++++++++++- 5 files changed, 54 insertions(+), 2 deletions(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 31ea7134..6311eaa3 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -1,5 +1,6 @@ /* Copyright 2020 Bruno Windels +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main-legacy.js b/src/main-legacy.js index 0c862566..dd89783e 100644 --- a/src/main-legacy.js +++ b/src/main-legacy.js @@ -1,3 +1,20 @@ +/* +Copyright 2020 Bruno Windels +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + // polyfills needed for IE11 import "core-js/stable"; import "regenerator-runtime/runtime"; diff --git a/src/matrix/net/request/fetch.js b/src/matrix/net/request/fetch.js index e7f33120..38624682 100644 --- a/src/matrix/net/request/fetch.js +++ b/src/matrix/net/request/fetch.js @@ -1,5 +1,6 @@ /* Copyright 2020 Bruno Windels +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/matrix/net/request/xhr.js b/src/matrix/net/request/xhr.js index ee35311b..77364df3 100644 --- a/src/matrix/net/request/xhr.js +++ b/src/matrix/net/request/xhr.js @@ -1,3 +1,19 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + import { AbortError, ConnectionError @@ -78,4 +94,4 @@ export function tests() { assert.equals(addCacheBuster("http://foo?bar=baz", random), "http://foo?bar=baz&_cacheBuster=5"); } } -} \ No newline at end of file +} diff --git a/src/matrix/net/timeout.js b/src/matrix/net/timeout.js index 463497a5..1e17bc3a 100644 --- a/src/matrix/net/timeout.js +++ b/src/matrix/net/timeout.js @@ -1,3 +1,20 @@ +/* +Copyright 2020 Bruno Windels +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + export function abortOnTimeout(createTimeout, timeoutAmount, requestResult, responsePromise) { const timeout = createTimeout(timeoutAmount); // abort request if timeout finishes first @@ -25,4 +42,4 @@ export function abortOnTimeout(createTimeout, timeoutAmount, requestResult, resp } } ); -} \ No newline at end of file +}