Commit b18dd354 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] support ipv6 localhost

R=pfeldman@chromium.org

Bug: none
Change-Id: I101d69a1b9efdb399a1ced589e3e7f74602ff576
Reviewed-on: https://chromium-review.googlesource.com/889919Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532689}
parent 9409ded1
......@@ -44,6 +44,17 @@ Parsing url: http://foo@example.com/foo/bar/baz.html?queryParam1=value1&queryPar
fragment: fragmentWith/Many//Slashes
folderPathComponents: /foo/bar
lastPathComponent: baz.html
Parsing url: http://[::]/?queryParam1=value1&queryParam2=value2#fragmentWith/Many//Slashes
isValid: true
scheme: http
user: undefined
host: [::]
port: undefined
path: /
queryParams: queryParam1=value1&queryParam2=value2
fragment: fragmentWith/Many//Slashes
folderPathComponents:
lastPathComponent:
Parsing url: http://example.com//?queryParam1=value1
isValid: true
scheme: http
......
......@@ -12,6 +12,9 @@
parseAndDumpURL(
'http://foo@example.com/foo/bar/baz.html?queryParam1=value1&queryParam2=value2#fragmentWith/Many//Slashes');
// support IPv6 localhost
parseAndDumpURL('http://[::]/?queryParam1=value1&queryParam2=value2#fragmentWith/Many//Slashes');
// Test how double (and more than double) slashes are parsed.
parseAndDumpURL('http://example.com//?queryParam1=value1');
parseAndDumpURL('http://example.com//foo.html');
......
......@@ -132,7 +132,7 @@ Common.ParsedURL = class {
// 8 - ?fragment
var schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//;
var userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/;
var hostRegex = /([^\s\/:]*)/;
var hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/;
var portRegex = /(?::([\d]+))?/;
var pathRegex = /(\/[^#?]*)?/;
var queryRegex = /(?:\?([^#]*))?/;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment