-
Notifications
You must be signed in to change notification settings - Fork 711
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: 'invalid memory address or nil pointer dereference' in response logger #872
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matlockx Thanks for the PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v2 #872 +/- ##
=======================================
Coverage 96.15% 96.15%
=======================================
Files 14 14
Lines 1821 1821
=======================================
Hits 1751 1751
Misses 46 46
Partials 24 24 ☔ View full report in Codecov by Sentry. |
@matlockx I was able to make the release prep work on the browser. Now, v2.15.3 has been released. |
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/go-resty/resty/v2](https://redirect.github.com/go-resty/resty) | `v2.15.2` -> `v2.15.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-resty%2fresty%2fv2/v2.15.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgo-resty%2fresty%2fv2/v2.15.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgo-resty%2fresty%2fv2/v2.15.2/v2.15.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-resty%2fresty%2fv2/v2.15.2/v2.15.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>go-resty/resty (github.com/go-resty/resty/v2)</summary> ### [`v2.15.3`](https://redirect.github.com/go-resty/resty/releases/tag/v2.15.3) [Compare Source](https://redirect.github.com/go-resty/resty/compare/v2.15.2...v2.15.3) ### Release Notes #### Bug Fixes - fix: 'invalid memory address or nil pointer dereference' in response logger by [@​matlockx](https://redirect.github.com/matlockx) in [https://github.com/go-resty/resty/pull/872](https://redirect.github.com/go-resty/resty/pull/872) #### Documentation - For release v2.15.3 by [@​jeevatkm](https://redirect.github.com/jeevatkm) in [https://github.com/go-resty/resty/pull/874](https://redirect.github.com/go-resty/resty/pull/874) #### New Contributors - [@​matlockx](https://redirect.github.com/matlockx) made their first contribution in [https://github.com/go-resty/resty/pull/872](https://redirect.github.com/go-resty/resty/pull/872) **Full Changelog**: go-resty/resty@v2.15.2...v2.15.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/Michsior14/transmission-gluetun-port-update). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…e in response logger (#872) Co-authored-by: Martin Jöhren <m.joehren@gmail.com>
An error like ‘dial tcp 10.66.0.229:80: connect: connection refused’ when request and response logging is activated causes an ‘invalid memory address or nil pointer dereference’. This is due to changes from version 2.14 to 2.15, where the logging call was moved up in the execute function. In version 2.14, the function returned early on this error, so the logging call was not made. Now, the logging call is made, and res.RawResponseProto is used without a nil check on RawResponse.
The fix is simple: use res.Proto(), which performs the nil check.
fixes #873