[Webkit-unassigned] [Bug 204414] New: Incorrect association of the URL object with the value port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 20 09:54:43 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=204414

            Bug ID: 204414
           Summary: Incorrect association of the URL object with the value
                    port
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: scrum at list.ru

const {hostname, port} = location;
const pathname = 'websocket';
const protocol = 'wss:'
const target = {hostname, pathname, port, protocol, search: ''};

Object.assign(new URL(location), target);

as a result of merging the above code, 0 value gets to the port

URL {
  hash: ""
  host: "bugs.webkit.org:0"
  hostname: "bugs.webkit.org"
  href: "wss://bugs.webkit.org:0/websocket"
  origin: "wss://bugs.webkit.org:0"
  password: ""
  pathname: "/websocket"
  port: "0"
  protocol: "wss:"
  search: ""
  searchParams: URLSearchParams {append: function, delete: function, get: function, getAll: function, has: function, …}
  username: ""
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191120/eba0519f/attachment.htm>


More information about the webkit-unassigned mailing list