Closed danyalmh closed 2 years ago
Just encountered this issue while browsing through the examples, there's a simple fix:
-req.Path = sdata[s:q]
-req.Query = sdata[q+1:i]
+req.Path = sdata[s:s+q]
+req.Query = sdata[s+q+1:i]
@mircodezorzi Could you open a PR for this?
Sure :+1:
https://github.com/gnet-io/gnet-examples/blob/4c982ee21cf2cabe5fd581cfd7652b4f1eb29332/examples/http/http.go#L160
req.path = sdata[s:q]
req.query = req.path[q+1 : i]
this code in http-parser have a bug, provide this error : ==> panic: runtime error: slice bounds out of range [:30] with length 15
i know you know what is problem ;-)