As discussed in #218, there are some cases of redirections where our plugin will mess up. Currently we only overwrite the parts that are redefined. These cases will not work correctly when starting with e.g. https://localhost:8000:
Location: http://otherhost/foobar => need to drop the port (and we already replace schema and domain)
Location ://otherhost/foobar => need to drop port (and we already keep scheme which happens to be correct, and replace domain)
Location: /foobar => already correct, we don't touch any of the domain, scheme or port
Description
As discussed in #218, there are some cases of redirections where our plugin will mess up. Currently we only overwrite the parts that are redefined. These cases will not work correctly when starting with e.g.
https://localhost:8000
:Location: http://otherhost/foobar
=> need to drop the port (and we already replace schema and domain)Location ://otherhost/foobar
=> need to drop port (and we already keep scheme which happens to be correct, and replace domain)Location: /foobar
=> already correct, we don't touch any of the domain, scheme or port