🐛 fix reauest headers copy

This commit is contained in:
Nicolas Lepage 2020-06-16 01:56:24 +02:00
parent 206b1e0326
commit da00fd7bd1
No known key found for this signature in database
GPG Key ID: B0879E35E66D8F6F

View File

@ -28,10 +28,11 @@ func (r Request) HTTPRequest() (*http.Request, error) {
headersIt := r.Get("headers").Call("entries")
for {
v := headersIt.Call("next")
if v.Get("done").Bool() {
e := headersIt.Call("next")
if e.Get("done").Bool() {
break
}
v := e.Get("value")
req.Header.Set(v.Index(0).String(), v.Index(1).String())
}