The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / test / simple / test-url.js @ 6f043940

History | View | Annotate | Download (43.2 KB)

# Date Author Comment
9520adeb 04/15/2014 06:30 PM isaacs

url: treat \ the same as /

See https://code.google.com/p/chromium/issues/detail?id=25916

Parse URLs with backslashes the same as web browsers, by replacing all
backslashes with forward slashes, except those that occur after the
first # character.

48a4600c 07/17/2013 06:59 PM Shuan Wang

url: Fix edge-case when protocol is non-lowercase

When using url.parse(), path and pathname usually return '/' when there
is no path available. However when you have a protocol that contains
non-lowercase letters and the input string does not have a trailing...

5dc51d4e 06/03/2013 06:56 PM isaacs

url: Properly parse certain oddly formed urls

In cases where there are multiple @-chars in a url, Node currently
parses the hostname and auth sections differently than web browsers.

This part of the bug is serious, and should be landed in v0.10, and
also ported to v0.8, and releases made as soon as possible....

54d293da 10/30/2012 12:16 PM J. Lee Coltrane

url: make url.format escape delimiters in path and query

`url.format` should escape ? and # chars in pathname, and # chars in
search, because they change the semantics of the operation otherwise.
Don't escape % chars, or anything else. (see: #4082)

9b61f570 10/25/2012 10:08 AM Ben Noordhuis

Merge remote-tracking branch 'origin/v0.8'

Conflicts:
configure
deps/v8/build/common.gypi

de0303d3 10/24/2012 07:06 PM Ben Noordhuis

url: parse hostnames that start with - or _

Allow hostnames like '-lovemonsterz.tumblr.com' and '_jabber._tcp.google.com'.

Fixes #4177.

7144be70 09/17/2012 01:44 PM isaacs

url: Go much faster by using Url class

V8 loves it when JavaScript pretends to be a Classic inheritance
type of language.

Before:

$ ./node benchmark/url.js
benchmarking parse() ... 1.868 sec
benchmarking format() ... 1.906 sec
benchmarking resolve("../foo/bar?baz=boom") ... 7.800 sec...

9fc7283a 05/16/2012 06:41 PM isaacs

Fix #3270 Escape url.parse delims

Rather than omitting them.

677c2c11 03/12/2012 03:46 PM Łukasz Walukiewicz

Ignore an empty port component when parsing URLs.

86f4846c 02/20/2012 11:11 AM Ben Noordhuis

url: decode url entities in auth section

Fixes #2736.

a94ffdae 01/31/2012 02:58 AM Łukasz Walukiewicz

url: Support for IPv6 addresses in URLs.

Fixes #1138, #2610.

358f0ce9 11/04/2011 08:36 AM Jordan Sissel

url: add '.' '+' and '-' in url protocol

- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples

216570b5 10/22/2011 01:14 AM seebees

Lint

1ead20f2 10/22/2011 01:14 AM seebees

remove auth from host

Fixes #1626

be4576de 10/22/2011 01:14 AM seebees

url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));

added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test...

fb93ab41 09/06/2011 11:04 AM Maciej Małecki

test: test for correct parsing of URLs with plus character in protocol

1b0e0547 07/20/2011 06:51 PM Ben Noordhuis

url: throw descriptive error if url argument to parse() is not a string

Fixes #568.

dcecfc5f 07/19/2011 12:55 PM isaacs

Close #1360 url: Allow _ in hostnames.

2a848fa7 07/06/2011 04:17 PM Jeremy Selier

Close #1149 IDNA and Punycode support in url.parse

Using @bnoordhuis's punycode lib.

Close #1174 also

58a1d7ec 05/27/2011 01:47 PM Ryan Petrello

Close #562 Close #1078 Parse file:// urls properly

The file:// protocol always has a hostname; it's frequently
abbreviated as an empty string, which represents 'localhost'
implicitly.

According to RFC 1738 (http://tools.ietf.org/html/rfc1738):

A file URL takes the form:...

307f39ce 05/10/2011 04:57 PM isaacs

Fix a url regression

The change for #954 introduced a regression that would cause
the url parser to fail on special chars found in the auth
segment. Fix that, and also don't create invalid urls when
format() is called on an object containing an auth member...

90802d62 04/20/2011 06:44 PM isaacs

Close #954 URL parsing/formatting corrections

1. Allow single-quotes in urls, but escape them.
2. Add comments about which RFCs we're following for guidance.
3. Handle any invalid character in the hostname portion.
4. lcase protocol and hostname portions, since they are...

55048cdf 03/14/2011 08:37 PM Ryan Dahl

Update copyright headers

d664bf37 02/27/2011 08:17 PM isaacs

Closes GH-711 URL parse more safely

This does 3 things:

1. Delimiters and "unwise" characters are never included in the
hostname or path.
2. url.format will sanitize string URLs that are passed to it.
3. The parsed url's 'href' member will be the sanitized url, which may...

6f726cf8 12/20/2010 04:48 PM Jeremy Martin

url.parse(url, true) defaults query field to {}

093dfaf8 12/05/2010 06:42 PM Oleg Efimov

GJSLint all tests, only 3 long lines left in test-url.js

test/simple/test-url.js:31:(0110) Line too long (82 characters).
test/simple/test-url.js:39:(0110) Line too long (85 characters).
test/simple/test-url.js:40:(0110) Line too long (92 characters).

a0159b4b 12/04/2010 06:58 PM Ryan Dahl

Fix global leaks

c0d69a48 12/02/2010 08:49 PM Oleg Efimov

GJSLint part of tests

e38eb0c5 10/11/2010 06:21 PM Micheil Smith

Soft migration of sys -> util, Removal of deprecated utils module.

0e311717 09/02/2010 12:24 PM isaacs

Treat "//some_path" as pathname rather than hostname by default.

Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes. It
does however remove some oddness in url.parse(req.url) which is the most...

9fd5e3c8 07/15/2010 05:21 PM Ryan Dahl

Update tests to work with module contexts

8c853404 06/30/2010 02:59 AM Blake Mizerany

fix whitespace errors

5861db8a 03/08/2010 08:57 PM isaacs

Remove process.mixin dependency from all tests.

04fac198 02/25/2010 02:41 PM arlolra

Split tests.