[arvados-workbench2] created: 2.5.0-79-ge16f2125

git repository hosting git at public.arvados.org
Tue Mar 21 16:09:45 UTC 2023


        at  e16f2125588512201e3bd22ae9a19e10cb69d367 (commit)


commit e16f2125588512201e3bd22ae9a19e10cb69d367
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Mar 21 12:09:09 2023 -0400

    19899: Use "Cache-Control: no-cache" in request instead of must-revalidate
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/common/webdav.test.ts b/src/common/webdav.test.ts
index 0a3b5170..1149c451 100644
--- a/src/common/webdav.test.ts
+++ b/src/common/webdav.test.ts
@@ -13,7 +13,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('PROPFIND', 'http://foo.com/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Authorization', 'Basic');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -26,7 +26,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('PROPFIND', 'http://foo.com/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Authorization', 'Basic');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -37,7 +37,7 @@ describe('WebDAV', () => {
         load();
         const request = await promise;
         expect(open).toHaveBeenCalledWith('PROPFIND', 'foo');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -50,7 +50,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('PUT', 'foo');
         expect(send).toHaveBeenCalledWith('Test data');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -62,7 +62,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('COPY', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-copy');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -74,7 +74,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('COPY', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-copy');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -86,7 +86,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('COPY', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-copy');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -98,7 +98,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('MOVE', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-moved');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -110,7 +110,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('MOVE', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-moved');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -122,7 +122,7 @@ describe('WebDAV', () => {
         const request = await promise;
         expect(open).toHaveBeenCalledWith('MOVE', 'http://base/foo');
         expect(setRequestHeader).toHaveBeenCalledWith('Destination', 'http://base/foo-moved');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 
@@ -133,7 +133,7 @@ describe('WebDAV', () => {
         load();
         const request = await promise;
         expect(open).toHaveBeenCalledWith('DELETE', 'foo');
-        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'must-revalidate');
+        expect(setRequestHeader).toHaveBeenCalledWith('Cache-Control', 'no-cache');
         expect(request).toBeInstanceOf(XMLHttpRequest);
     });
 });
diff --git a/src/common/webdav.ts b/src/common/webdav.ts
index bb8a68bd..1f3da0d6 100644
--- a/src/common/webdav.ts
+++ b/src/common/webdav.ts
@@ -9,7 +9,7 @@ export class WebDAV {
     private defaults: WebDAVDefaults = {
         baseURL: '',
         headers: {
-            'Cache-Control': 'must-revalidate'
+            'Cache-Control': 'no-cache'
         },
     };
 
@@ -94,7 +94,7 @@ export class WebDAV {
             this.defaults.baseURL = this.defaults.baseURL.replace(/\/+$/, '');
             r.open(config.method,
                 `${this.defaults.baseURL
-                    ? this.defaults.baseURL+'/'
+                    ? this.defaults.baseURL + '/'
                     : ''}${customEncodeURI(config.url)}`);
 
             const headers = { ...this.defaults.headers, ...config.headers };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list