Skip to content

Commit

Permalink
Merge pull request cockroachdb#58696 from knz/backport20.2-58657
Browse files Browse the repository at this point in the history
release-20.2: server: remove support for binary protobuf payloads in the HTTP endpoints
  • Loading branch information
knz authored Jan 11, 2021
2 parents 350edd7 + 5bcd86f commit d1efcf9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1182,13 +1182,10 @@ func (s *Server) Start(ctx context.Context) error {
EmitDefaults: true,
Indent: " ",
}
protopb := new(protoutil.ProtoPb)
gwMux := gwruntime.NewServeMux(
gwruntime.WithMarshalerOption(gwruntime.MIMEWildcard, jsonpb),
gwruntime.WithMarshalerOption(httputil.JSONContentType, jsonpb),
gwruntime.WithMarshalerOption(httputil.AltJSONContentType, jsonpb),
gwruntime.WithMarshalerOption(httputil.ProtoContentType, protopb),
gwruntime.WithMarshalerOption(httputil.AltProtoContentType, protopb),
gwruntime.WithOutgoingHeaderMatcher(authenticationHeaderMatcher),
gwruntime.WithMetadata(forwardAuthenticationMetadata),
)
Expand Down
4 changes: 0 additions & 4 deletions pkg/util/httputil/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ const (
JSONContentType = "application/json"
// AltJSONContentType is the alternate JSON content type.
AltJSONContentType = "application/x-json"
// ProtoContentType is the protobuf content type.
ProtoContentType = "application/x-protobuf"
// AltProtoContentType is the alternate protobuf content type.
AltProtoContentType = "application/x-google-protobuf"
// PlaintextContentType is the plaintext content type.
PlaintextContentType = "text/plain"
// GzipEncoding is the gzip encoding.
Expand Down

0 comments on commit d1efcf9

Please sign in to comment.