1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-30 10:43:30 +00:00

httpdriver: Fix MockRequest.AddHeader crash

This commit is contained in:
diamondburned 2022-12-09 15:39:33 -08:00
parent b3b2478481
commit 99e5f6c2b8
No known key found for this signature in database
GPG key ID: D78C4471CE776659

View file

@ -79,6 +79,10 @@ func (r *MockRequest) GetContext() context.Context {
}
func (r *MockRequest) AddHeader(h http.Header) {
if r.Header == nil {
r.Header = make(http.Header)
}
for k, v := range h {
r.Header[k] = append(r.Header[k], v...)
}