Bug 60389
Summary: | Web Inspector: missing colon in URL calculation in ExtensionAPI.js | ||
---|---|---|---|
Product: | WebKit | Reporter: | Patrick Mueller <pmuellr> |
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, yurys |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Patrick Mueller
In ExtensionAPI.js, on line 447, in function expandURL(), the expression to set the variable baseURL does not add a colon between the hostname and port.
The existing code looks like this:
function expandURL(url)
{
if (!url)
return url;
if (/^[^/]+:/.exec(url)) // See if url has schema.
return url;
var baseURL = location.protocol + "//" + location.hostname + location.port;
if (/^\//.exec(url))
return baseURL + url;
return baseURL + location.pathname.replace(/\/[^/]*$/,"/") + url;
}
I've modified the code for weinre to do this:
var baseURL = location.protocol + "//" + location.hostname + ":" + location.port;
Note this means that for http/80, URLs are generate that look like this:
http://host.name.here:/path/goes/here
Basically, empty string after the colon. The browser seemed to do a good job handling this, but not sure how kosher that really is.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brian Burg
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.