Closed khanrn closed 1 year ago
Do we need a test case which covers the changes in code?
I notice that the original implementation follows the canonical algorithm put forth by the RFC as seen here:
https://www.rfc-editor.org/rfc/rfc3986#section-5.2.2
Using the canonical algorithm at least gives me confidence that the conversion in the existing implementation was correct. So a test would be needed, but I don't know if I see the need to move away from the current implementation given that it's taken from the RFC.
You are right @restenb. As the original one is an exact implementation from RFC 3986, therefore this shouldn't be refactored. :+1:
When studying the codebase the current conditional structure of this
resolve_reference
function seemed a bit complex to me. Therefore, here I'm proposing new simplified conditional structure using early return.NB. 100% of all the 26 tests has been passed! :slightly_smiling_face: