Bug 40483: Temporarily redirect DW's v2 address to their new v3 address
Closes #40483 (closed)
Here, we take advantage of Firefox "semi-smart url fixup on failure" behavior. When the requested URL results in an error, then Firefox tries to tweak the URL in a way that may result in success. In this patch's new behavior, when the load failure is NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS
, then we test if the requested URL's hostname ends with DW's current v2 address. If it does, then we grab any subdomains from the original request and prepend it to DW's new v3 address, and then create a new (updated) request with the new hostname.
This is a one-off situation where we are helping DW. This is not intended as a scalable mapping from V2->V3 addresses.