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 ...@@ -44,6 +44,17 @@ Parsing url: http://foo@example.com/foo/bar/baz.html?queryParam1=value1&queryPar
fragment: fragmentWith/Many//Slashes fragment: fragmentWith/Many//Slashes
folderPathComponents: /foo/bar folderPathComponents: /foo/bar
lastPathComponent: baz.html 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 Parsing url: http://example.com//?queryParam1=value1
isValid: true isValid: true
scheme: http scheme: http
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
parseAndDumpURL( parseAndDumpURL(
'http://foo@example.com/foo/bar/baz.html?queryParam1=value1&queryParam2=value2#fragmentWith/Many//Slashes'); '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. // Test how double (and more than double) slashes are parsed.
parseAndDumpURL('http://example.com//?queryParam1=value1'); parseAndDumpURL('http://example.com//?queryParam1=value1');
parseAndDumpURL('http://example.com//foo.html'); parseAndDumpURL('http://example.com//foo.html');
......
...@@ -132,7 +132,7 @@ Common.ParsedURL = class { ...@@ -132,7 +132,7 @@ Common.ParsedURL = class {
// 8 - ?fragment // 8 - ?fragment
var schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//; var schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//;
var userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/; var userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/;
var hostRegex = /([^\s\/:]*)/; var hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/;
var portRegex = /(?::([\d]+))?/; var portRegex = /(?::([\d]+))?/;
var pathRegex = /(\/[^#?]*)?/; var pathRegex = /(\/[^#?]*)?/;
var queryRegex = /(?:\?([^#]*))?/; 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