Skip to content

Commit ff47150

Browse files
committed
fix: leave JSON nulls alone
1 parent 4597dd3 commit ff47150

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gorillamux/gorillamux.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ func jsonBodyFieldsAsVars(body []byte, mapping map[string]string, vars map[strin
190190
valueStr := string(value)
191191
switch {
192192
case valueStr == "null":
193-
// JSON null is handled as empty string command arg
194-
vars[name] = ""
193+
// JSON nulls are left alone
195194

196195
case valueStr[0] == '"':
197196
// Unescape JSON string

0 commit comments

Comments
 (0)