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

Request.SelectedRoutePath panics if no route is selected #467

Closed
axw opened this issue Apr 12, 2021 · 2 comments
Closed

Request.SelectedRoutePath panics if no route is selected #467

axw opened this issue Apr 12, 2021 · 2 comments

Comments

@axw
Copy link

axw commented Apr 12, 2021

Request.SelectedRoutePath panics when called on a request with selected route. For example, this happens when using Elastic APM's apmrestful filter: https://github.com/elastic/apm-agent-go/blob/f62afdfda01d0cbe73f477c357d5b8a3017e5144/module/apmrestful/filter.go#L55-L66

This is caused by https://github.com/emicklei/go-restful/pull/462/files. Previously the method would return "".

axw added a commit to axw/apm-agent-go that referenced this issue Apr 12, 2021
Pin to an older version of go-restful, to work around
emicklei/go-restful#467
axw added a commit to elastic/apm-agent-go that referenced this issue Apr 12, 2021
* scripts: pin go-restful to v3.4.0

Pin to an older version of go-restful, to work around
emicklei/go-restful#467

* Pin to v2.9.6 instead

To cater for Go 1.8, pin to v2.9.6 instead. We'll
continue to test newer versions with versions of
Go that support modules.
@emicklei
Copy link
Owner

thank you for reporting this. somehow the tests did not capture this. will work on a fix asap

@emicklei
Copy link
Owner

#468

emicklei added a commit that referenced this issue Apr 12, 2021
* fix handling no match access selected path

* remove obsolete field
@axw axw closed this as completed May 30, 2021
stuartnelson3 pushed a commit to elastic/apm-agent-go that referenced this issue Jul 30, 2021
* scripts: pin go-restful to v3.4.0

Pin to an older version of go-restful, to work around
emicklei/go-restful#467

* Pin to v2.9.6 instead

To cater for Go 1.8, pin to v2.9.6 instead. We'll
continue to test newer versions with versions of
Go that support modules.
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

No branches or pull requests

2 participants