Skip to content

Commit

Permalink
Default HTTP Codec to V1 (#320)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Milligan <ianmllgn@gmail.com>
  • Loading branch information
ian-mi committed Mar 2, 2020
1 parent 8a7a70e commit 34d69b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/cloudevents/transport/http/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ var _ transport.Codec = (*Codec)(nil)

func (c *Codec) loadCodec(encoding Encoding) (transport.Codec, error) {
switch encoding {
case Default:
fallthrough
case BinaryV01, StructuredV01:
c._v01.Do(func() {
c.v01 = &CodecV01{DefaultEncoding: c.Encoding}
Expand All @@ -54,7 +52,7 @@ func (c *Codec) loadCodec(encoding Encoding) (transport.Codec, error) {
c.v03 = &CodecV03{DefaultEncoding: c.Encoding}
})
return c.v03, nil
case BinaryV1, StructuredV1, BatchedV1:
case BinaryV1, StructuredV1, BatchedV1, Default:
c._v1.Do(func() {
c.v1 = &CodecV1{DefaultEncoding: c.Encoding}
})
Expand Down

0 comments on commit 34d69b7

Please sign in to comment.