Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix http server example - parsing request path and query #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewgRa
Copy link

@ewgRa ewgRa commented Jan 20, 2020

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 ewgRa requested a review from tidwall January 24, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant