$OpenBSD$ index 1c5f8a6..473d45c 100644 --- netwerk/base/src/nsStandardURL.cpp.orig Fri Feb 20 15:40:37 2015 +++ netwerk/base/src/nsStandardURL.cpp Fri Feb 20 15:40:37 2015 @@ -1543,8 +1543,13 @@ nsStandardURL::SetHost(const nsACString &input) buf.AppendInt(mPort); port_length = buf.Length(); } - mHost.mPos = mAuthority.mPos + mAuthority.mLen - port_length; - mHost.mLen = 0; + if (mAuthority.mLen > 0) { + mHost.mPos = mAuthority.mPos + mAuthority.mLen - port_length; + mHost.mLen = 0; + } else if (mScheme.mLen > 0) { + mHost.mPos = mScheme.mPos + mScheme.mLen + 3; + mHost.mLen = 0; + } } int32_t shift = ReplaceSegment(mHost.mPos, mHost.mLen, host, len); @@ -1634,7 +1639,6 @@ nsStandardURL::SetPath(const nsACString &input) ENSURE_MUTABLE(); const nsPromiseFlatCString &path = PromiseFlatCString(input); - LOG(("nsStandardURL::SetPath [path=%s]\n", path.get())); InvalidateCache();