Commit Graph

14 Commits

Author SHA1 Message Date
isaacs
d664bf376d 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
   not match the argument to url.parse.
2011-02-27 17:17:40 -08:00
Ryan Dahl
5a05992155 Lint 2011-01-06 16:06:27 -08:00
Bert Belder
af15b4e45a Remove path module dependency from url module
Now the path module can be adapted to support windows paths without breaking
the url module.  It also allows the undocumented keepBlanks flag to be
removed from path.join and path.normalizeArray.
2011-01-05 11:27:22 -08:00
Jeremy Martin
6f726cf8c7 url.parse(url, true) defaults query field to {} 2010-12-20 13:48:44 -08:00
isaacs
7c57eb2aec lint url.js 2010-12-02 11:46:32 -08:00
isaacs
9996b459e1 Implement new path.join behavior
1. Express desired path.join behavior in tests.
2. Update fs.realpath to reflect new path.join behavior
3. Update url.resolve() to use new path.join behavior.
2010-11-14 22:49:26 -08:00
Joshaven Potter
3d4e4d8909 syntax fixes to pass jslint 2010-10-06 20:40:57 -07:00
isaacs
0e311717b5 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
common use-case for the url.parse function.
2010-09-02 09:24:21 -07:00
Tim Caswell
62d9852c3d Replace slow and broken for..in loops with faster for loops over the keys. 2010-04-12 10:34:35 -07:00
isaacs
57fbb627ca trailing whitespace fixes 2010-04-11 14:48:23 -07:00
Ryan Dahl
b8dee2eb20 camel case variables in url module 2010-02-22 06:49:14 -08:00
cloudhead
3669c75f4d removed inline require call for querystring 2010-01-24 14:25:31 -08:00
Benjamin Thomas
947c577c0d Fix bug in the url module's url_parse method if 'parseQueryString' is true 2010-01-06 02:12:11 -08:00
isaacs
7ff04c1f86 Add URL and QueryString modules, and tests for each.
Also, make a slight change from original on url-module to put the
spacePattern into the function.  On closer inspection, it turns out that the
nonlocal-var cost is higher than the compiling-a-regexp cost.

Also, documentation.
2010-01-04 21:03:54 -08:00