diff --git a/Gopkg.lock b/Gopkg.lock index f9ab0c17aba1..4a2662864269 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -421,7 +421,7 @@ branch = "master" name = "github.com/grpc-ecosystem/grpc-gateway" packages = ["protoc-gen-grpc-gateway","protoc-gen-grpc-gateway/descriptor","protoc-gen-grpc-gateway/generator","protoc-gen-grpc-gateway/gengateway","protoc-gen-grpc-gateway/httprule","runtime","runtime/internal","utilities"] - revision = "b0be3cdef0ed27e3c420795e2efbfe9c27e839cc" + revision = "8879672da99842abac4c1e84ea91d1ae082673fb" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index b41a4a46f6a0..409b217014cf 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -47,7 +47,7 @@ ignored = [ name = "github.com/go-sql-driver/mysql" branch = "master" -# https://github.com/grpc-ecosystem/grpc-gateway/commit/893772d +# https://github.com/grpc-ecosystem/grpc-gateway/commit/8db8c1a [[constraint]] name = "github.com/grpc-ecosystem/grpc-gateway" branch = "master" diff --git a/pkg/util/protoutil/jsonpb_marshal.go b/pkg/util/protoutil/jsonpb_marshal.go index 5c9317720be1..8d07efccec3c 100644 --- a/pkg/util/protoutil/jsonpb_marshal.go +++ b/pkg/util/protoutil/jsonpb_marshal.go @@ -133,3 +133,10 @@ func (j *JSONPb) NewEncoder(w io.Writer) gwruntime.Encoder { return errors.Errorf("unexpected type %T does not implement %s", v, typeProtoMessage) }) } + +var _ gwruntime.Delimited = (*JSONPb)(nil) + +// Delimiter implements gwruntime.Delimited. +func (*JSONPb) Delimiter() []byte { + return []byte("\n") +} diff --git a/pkg/util/protoutil/marshaler.go b/pkg/util/protoutil/marshaler.go index 0f93fba8820f..7cd13858e812 100644 --- a/pkg/util/protoutil/marshaler.go +++ b/pkg/util/protoutil/marshaler.go @@ -101,3 +101,10 @@ func (e *protoEncoder) Encode(v interface{}) error { } return errors.Errorf("unexpected type %T does not implement %s", v, typeProtoMessage) } + +var _ gwruntime.Delimited = (*ProtoPb)(nil) + +// Delimiter implements gwruntime.Delimited. +func (*ProtoPb) Delimiter() []byte { + return nil +} diff --git a/vendor b/vendor index ca29dc9048be..fc3aa43d58ff 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit ca29dc9048bee1542ac140a93999cd87d6a902f7 +Subproject commit fc3aa43d58ff2f3bd35e23831b95f9c6f8df681b