mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
🐛 fix reauest headers copy
This commit is contained in:
parent
206b1e0326
commit
da00fd7bd1
@ -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())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user