Age | Commit message (Collapse) | Author | Files | Lines |
|
Port of https://github.com/joyent/node/pull/8603
The race condition present in the original PR didn't occur, so no
workaround was needed.
PR-URL: https://github.com/nodejs/io.js/pull/1794
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
PR-URL: https://github.com/iojs/io.js/pull/1539
Fixes: https://github.com/iojs/io.js/issues/1253
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
|
|
stringifyPrimitive has always failed to stringify numbers since its
introduction in 422d3c9. This went uncaught due to encodeURIComponent's
string coercion.
Fixes: https://github.com/iojs/io.js/issues/1208
PR-URL: https://github.com/iojs/io.js/pull/1213
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
|
|
Fixes a number parsing regression introduced in 85a92a3
Fixes: https://github.com/iojs/io.js/issues/1208
PR-URL: https://github.com/iojs/io.js/pull/1213
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
|
|
parse optimizations:
* Move try-catch to separate function to keep entire function from
being deoptimized.
* Use key array lookup instead of using hasOwnProperty.
* Avoid decoding known empty strings.
* Avoid possibly unnecessary switch to slower decoder for values if
key decoding throws.
stringify optimizations:
* Use manual loop for default encoder instead of encodeURIComponent.
* Use string concatenation instead of joining an array of strings.
* Avoid caching result of typeof.
PR-URL: https://github.com/iojs/io.js/pull/847
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
Many of the util.is*() methods used to check data types
simply compare against a single value or the result of
typeof. This commit replaces calls to these methods with
equivalent checks. This commit does not touch calls to the
more complex methods (isRegExp(), isDate(), etc.).
Fixes: https://github.com/iojs/io.js/issues/607
PR-URL: https://github.com/iojs/io.js/pull/647
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
This commit replaces a number of var statements throughout
the lib code with const statements.
PR-URL: https://github.com/iojs/io.js/pull/541
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
|
|
Turn on strict mode for the files in the lib/ directory. It helps
catch bugs and can have a positive effect on performance.
PR-URL: https://github.com/node-forward/node/pull/64
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
Conflicts:
ChangeLog
deps/v8/src/hydrogen.cc
lib/http.js
lib/querystring.js
src/node_crypto.cc
src/node_version.h
test/simple/test-querystring.js
|
|
Documentation states that `querystring.unescape` may be overridden to
replace unescaper during parsing. However, the function was only
being used as a fallback for when the native decoder throws (on a
malformed URL). This patch moves the call to the native function and
the try/catch around it into querystring.unescape then has the parser
always invoke it, so that an override will always be used.
Fixes #4055
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
Currently, stringification of an empty array outputs a single
separator character. This commit causes an empty array to output
the empty string.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
|
|
Not all querystring are utf-8 encoding, make querystring can be used
to encode / decode `non-utf8` encoding string if necessary.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
|
|
QueryString.stringify() allowed a fourth argument that was used as a
conditional in the return value, but was undocumented, not used by core
and always was always false/undefiend. So the argument and conditional
have been removed.
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
|
|
This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.
|
|
|
|
|
|
Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
|
|
Binding of `http_parser` in querystring isn't used anywhere and should
be removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
ChangeLog
deps/v8/src/version.cc
deps/v8/tools/gyp/v8.gyp
doc/about/index.html
doc/community/index.html
doc/index.html
doc/logos/index.html
doc/template.html
lib/path.js
lib/querystring.js
src/node_version.h
|
|
Use decodeURIComponent when appropriate, and only fall back to
querystring.decode if it throws, or if the character is a '+'.
Fix #2248
|
|
|
|
|
|
If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)`
can fail. Any time a dictionary of user-generated items is built, we
cannot rely on hasOwnProperty being safe, so must call it from the
Object.prototype explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Handle only the most basic of query string parsing and construction.
Leave the rest (e.g. Rails/PHP behaviors) to modules higher up the
stack, like Express.
|
|
|
|
The tests did not accurately test for a strict equality, meaning that the
number == to the string.
|
|
* handles NaN and Infinity
* works with arrays from other contexts
|
|
Also added ability to parse foo.bar=4 equal to foo[bar]=4
Added tests for this as well
|
|
|
|
And add a few more tests.
|
|
querystring.stringify
|
|
|
|
|
|
|
|
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.
|