From 96c48ba6a3ac1565555ca53dc1ec8902f21b6a69 Mon Sep 17 00:00:00 2001 From: "wudi.daniel" Date: Thu, 14 Oct 2021 19:20:41 +0800 Subject: [PATCH] feat(metainfo): define standard for backward prefix --- cloud/metainfo/http.go | 2 ++ cloud/metainfo/info.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/cloud/metainfo/http.go b/cloud/metainfo/http.go index dd10b715..70e22853 100644 --- a/cloud/metainfo/http.go +++ b/cloud/metainfo/http.go @@ -23,9 +23,11 @@ import ( const ( HTTPPrefixTransient = "rpc-transit-" HTTPPrefixPersistent = "rpc-persist-" + HTTPPrefixBackward = "rpc-backward-" lenHPT = len(HTTPPrefixTransient) lenHPP = len(HTTPPrefixPersistent) + lenHPB = len(HTTPPrefixBackward) ) // HTTPHeaderToCGIVariable performs an CGI variable conversion. diff --git a/cloud/metainfo/info.go b/cloud/metainfo/info.go index dcc45667..580f77bf 100644 --- a/cloud/metainfo/info.go +++ b/cloud/metainfo/info.go @@ -23,10 +23,14 @@ const ( PrefixPersistent = "RPC_PERSIST_" PrefixTransient = "RPC_TRANSIT_" PrefixTransientUpstream = "RPC_TRANSIT_UPSTREAM_" + PrefixBackward = "RPC_BACKWARD_" + PrefixBackwardUpstream = "RPC_BACKWARD_UPSTREAM_" lenPTU = len(PrefixTransientUpstream) lenPT = len(PrefixTransient) lenPP = len(PrefixPersistent) + lenB = len(PrefixBackward) + lenBU = len(PrefixBackwardUpstream) ) // **Using empty string as key or value is not support.**