[ARVADOS] updated: 1.2.0-146-gfde27ce0e

Git user git at public.curoverse.com
Thu Oct 4 10:16:11 EDT 2018


Summary of changes:
 services/keepstore/handlers.go     | 5 -----
 services/keepstore/proxy_remote.go | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

       via  fde27ce0e46521db9828c228e7fb531e003724a8 (commit)
      from  1e27ecf1368de5932c4af00c6cff9595c501f5f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fde27ce0e46521db9828c228e7fb531e003724a8
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Thu Oct 4 10:15:22 2018 -0400

    14199: Drop Vary response header for non-proxyable requests.
    
    The X-Keep-Signature header is ignored for such requests anyway.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go
index 2210c8c6d..d84ede6ef 100644
--- a/services/keepstore/handlers.go
+++ b/services/keepstore/handlers.go
@@ -101,11 +101,6 @@ func (rtr *router) handleGET(resp http.ResponseWriter, req *http.Request) {
 	ctx, cancel := contextForResponse(context.TODO(), resp)
 	defer cancel()
 
-	// Intervening proxies must not return a cached GET response
-	// to a prior request if a X-Keep-Signature request header has
-	// been added or changed.
-	resp.Header().Add("Vary", "X-Keep-Signature")
-
 	locator := req.URL.Path[1:]
 	if strings.Contains(locator, "+R") && !strings.Contains(locator, "+A") {
 		rtr.remoteProxy.Get(ctx, resp, req, rtr.cluster)
diff --git a/services/keepstore/proxy_remote.go b/services/keepstore/proxy_remote.go
index aaa1a0188..9f4a8ef1a 100644
--- a/services/keepstore/proxy_remote.go
+++ b/services/keepstore/proxy_remote.go
@@ -26,6 +26,11 @@ type remoteProxy struct {
 }
 
 func (rp *remoteProxy) Get(ctx context.Context, w http.ResponseWriter, r *http.Request, cluster *arvados.Cluster) {
+	// Intervening proxies must not return a cached GET response
+	// to a prior request if a X-Keep-Signature request header has
+	// been added or changed.
+	w.Header().Add("Vary", "X-Keep-Signature")
+
 	token := GetAPIToken(r)
 	if token == "" {
 		http.Error(w, "no token provided in Authorization header", http.StatusUnauthorized)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list