Azure / go-ntlmssp

NTLM/Negotiate authentication over HTTP
MIT License
189 stars 67 forks source link

Support nil Body #2

Closed nqv closed 8 years ago

nqv commented 8 years ago

http.RoundTripper allows nil Body for http.Request (i.e. for GET requests) but Negotiator panics:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x122339]

goroutine 1 [running]:
bytes.(*Buffer).ReadFrom(0xc8200536c8, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/bytes/buffer.go:173 +0x239
github.com/Azure/go-ntlmssp.Negotiator.RoundTrip(0x1364488, 0xc8200a4090, 0xc8200c2000, 0x0, 0x0, 0x0)
        /path/to/go/src/github.com/Azure/go-ntlmssp/negotiator.go:18 +0xb7
github.com/Azure/go-ntlmssp.(*Negotiator).RoundTrip(0xc820078ca0, 0xc8200c2000, 0x2, 0x0, 0x0)