From 1ba31fcc059673a148470bc1832fa5e686c72f4b Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 11 Jan 2019 15:59:57 +0100 Subject: [PATCH] fix(general): Do not remove empty cookies or headers (#138) --- general/src/protocol/request.rs | 6 +++--- server/src/actors/project.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/general/src/protocol/request.rs b/general/src/protocol/request.rs index 3ff40a1247..4a15843d1e 100644 --- a/general/src/protocol/request.rs +++ b/general/src/protocol/request.rs @@ -216,17 +216,17 @@ pub struct Request { /// URL encoded contents of the Cookie header. #[metastructure(pii = "true", bag_size = "medium")] - #[metastructure(skip_serialization = "empty_deep")] + #[metastructure(skip_serialization = "empty")] pub cookies: Annotated, /// HTTP request headers. #[metastructure(pii = "true", bag_size = "large")] - #[metastructure(skip_serialization = "empty_deep")] + #[metastructure(skip_serialization = "empty")] pub headers: Annotated, /// Server environment data, such as CGI/WSGI. #[metastructure(pii = "true", bag_size = "large")] - #[metastructure(skip_serialization = "empty_deep")] + #[metastructure(skip_serialization = "empty")] pub env: Annotated>, /// The inferred content type of the request payload. diff --git a/server/src/actors/project.rs b/server/src/actors/project.rs index 133cb89ac0..85b82fea77 100644 --- a/server/src/actors/project.rs +++ b/server/src/actors/project.rs @@ -733,10 +733,10 @@ impl Handler for ProjectCache { match self.config.relay_mode() { RelayMode::Proxy => { - return Response::ok(ProjectStateResponse::local(ProjectState::allowed())) + return Response::ok(ProjectStateResponse::local(ProjectState::allowed())); } RelayMode::Static => { - return Response::ok(ProjectStateResponse::local(ProjectState::missing())) + return Response::ok(ProjectStateResponse::local(ProjectState::missing())); } RelayMode::Managed => { // Proceed with loading the config from upstream