gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: forcing update when querying


From: gnunet
Subject: [taler-wallet-core] branch master updated: forcing update when querying the terms, and fixing bug in request header parsing
Date: Sun, 16 Jan 2022 22:37:52 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new ac60a055 forcing update when querying the terms, and fixing bug in 
request header parsing
ac60a055 is described below

commit ac60a0559c660192710524e3c584ce2a91f8e6d2
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Sun Jan 16 18:37:36 2022 -0300

    forcing update when querying the terms, and fixing bug in request header 
parsing
---
 packages/taler-wallet-core/src/wallet.ts                |  1 +
 .../src/serviceWorkerHttpLib.ts                         | 17 +++--------------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 7bbbb1ff..182453ff 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -441,6 +441,7 @@ async function getExchangeTos(
     ws,
     exchangeBaseUrl,
     acceptedFormat,
+    true,
   );
   const content = exchangeDetails.termsOfServiceText;
   const currentEtag = exchangeDetails.termsOfServiceLastEtag;
diff --git a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts 
b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
index f8953f73..a66d4e09 100644
--- a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
@@ -45,8 +45,9 @@ export class ServiceWorkerHttpLib implements 
HttpRequestLibrary {
     })
 
     const headerMap = new Headers();
-    response.headers.forEach(addLineToMap(headerMap));
-
+    response.headers.forEach((value, key) => {
+      headerMap.set(key, value);
+    })
     return {
       headers: headerMap,
       status: response.status,
@@ -132,15 +133,3 @@ function makeJsonHandler(response: Response, requestUrl: 
string) {
   }
 }
 
-function addLineToMap(map: { set(k: string, v: string): void }) {
-  return (line: string) => {
-    const parts = line.split(": ");
-    const headerName = parts.shift();
-    if (!headerName) {
-      logger.warn("skipping invalid header");
-      return;
-    }
-    const value = parts.join(": ");
-    map.set(headerName, value);
-  }
-}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]