I file this issue because I do not know the reason why Rails doesn't respect network path references that are defined in RFC3986 Section 4.2.
There is also a good StackOverflow discussion about those URLs.
We use this url scheme to build protocol agnostic urls that just work for both http and https. Since in our special case we cannot reliably determine if https is used, we prefer this way.
The second reason is that we avoid all mixed content warnings, if https is used and resources from our application are being referenced.
But it fails when I use Rails' redirect_to method. The reason is clear, because only protocol specific urls are being recognized by the redirect_to method internals
If we want to redirect_to "//asset.host.com/resources/12345" Rails redirects to http://application.host.com//asset.host.com/resources/12345.
Now I'm only some keystrokes away from fixing this problem in the Rails core, but before I start I'd like to know why Rails works this way. Is there a specific reason for this behaviour?
Fix for redirect_to to respect urls with a network path reference lik…
…e "//asset.host.com/resources/1235" see issue #3856
@Overbryd closing this as PR already merged. Right ??