Skip to content

Commit 68f369f

Browse files
committed
Fix -d 'null'
Signed-off-by: Glenn Lewis <[email protected]>
1 parent 26699da commit 68f369f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpdebug/httpdebug.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (t *CurlTransport) dumpRequestAsCurl(req *http.Request) (string, error) {
181181
if err != nil {
182182
return "", err
183183
}
184-
if buf != nil {
184+
if len(buf) > 0 {
185185
lines = append(lines, fmt.Sprintf("-d '%v'", escapeSingleQuote(string(buf))))
186186
}
187187
req.Body = ioutil.NopCloser(bytes.NewBuffer(buf))

0 commit comments

Comments
 (0)