🐛 bug: fix proxy overwrote the wrong scheme - #2004
Conversation
|
thanks for the work, can you look over my comments |
In this scenario, addr is a slice reference to the More specifically, for the above example, addr is equivalent to requestURI[1:], so after the requestURI changes from /http://ip-api.com/json to http://ip-api.com/json addr will change from http://ip-api.com/json to ttp://ip-api.com/json, causing SetSchema to fail. So I think it is necessary to make the above changes. |
yes i know so it should be enough to inject the copy when setting the requestUri |
|
since this removes the link to the variable with the addr, the following change is then no longer necessary |
When I use the modifications you mentioned above, I can't pass the test. In SetRequestURI, |
|
Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
* 🐛 bug: fix proxy overwrote the wrong scheme * ✅ fix: fix io not exist in go1.14
Please provide enough information so that others can review your pull request:
Fix proxy overwrote the wrong scheme
Explain the details for making this change. What existing problem does the pull request solve?
close #2001
Commit formatting
Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/