Skip to content

Commit be8a45a

Browse files
committed
add check to see is extracted baggage values are nil, since the Values method can technically return nil
1 parent 9de8b16 commit be8a45a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

propagation/baggage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func extractSingleBaggage(parent context.Context, carrier TextMapCarrier) contex
5656

5757
func extractMultiBaggage(parent context.Context, carrier MultiTextMapCarrier) context.Context {
5858
bVals := carrier.Values(baggageHeader)
59-
if len(bVals) == 0 {
59+
if bVals == nil || len(bVals) == 0 {
6060
return parent
6161
}
6262
members := make([]baggage.Member, 0)

0 commit comments

Comments
 (0)