Fixes for mixed-content and scheme-relative URLs