evio icon indicating copy to clipboard operation
evio copied to clipboard

Fix http server example - parsing request path and query

Open ewgRa opened this issue 4 years ago • 0 comments

When I run "go run main.go --noparse=false" and made request like "curl localhost:8080/aaa?dddd=ddd" I got panic:

panic: runtime error: slice bounds out of range [:17] with length 0 goroutine 6 [running]: main.parsereq(0xc00001e240, 0x5a, 0x60, 0xc000059a78, 0x900100004367cc, 0x0, 0x8, 0x417e5e, 0xc000059a38) /home/ewgra/dev/go/src/github.com/tidwall/evio/examples/http-server/main.go:175 +0x773

This PR fixes http server example - parsing request path and query.

ewgRa avatar Jan 20 '20 23:01 ewgRa