summaryrefslogtreecommitdiff
path: root/lib/querystring.js
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'upstream/v0.10' into v0.12Timothy J Fontaine2014-09-161-2/+6
|\ | | | | | | | | | | | | | | | | | | | | 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
| * querystring: fix unescape overrideTristan Berger2014-08-271-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | querystring: do not add sep for empty arraycjihrig2014-07-241-10/+13
| | | | | | | | | | | | | | | | 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>
* | querystring: custom encode and decodefengmk22014-05-221-7/+16
| | | | | | | | | | | | | | 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: remove `name` from `stringify()`Yorkie2013-12-301-5/+2
| | | | | | | | | | | | | | | | | | 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>
* | Revert "util: more strict check for bool/number/string"Trevor Norris2013-12-201-1/+1
| | | | | | | | This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.
* | util: more strict check for bool/number/stringYorkie2013-12-181-1/+1
| |
* | src: Replace macros with util functionsisaacs2013-08-011-9/+10
| |
* | lib: macro-ify type checksBen Noordhuis2013-07-241-19/+13
|/ | | | | Increases the grep factor. Makes it easier to harmonize type checks across the code base.
* querystring: Removing unnecessary bindingMitar2013-04-011-1/+0
| | | | | Binding of `http_parser` in querystring isn't used anywhere and should be removed.
* trivial: Doc typo and lint fixisaacs2012-06-191-1/+1
|
* querystring: improved speed and code cleanupFelix Böhm2012-06-161-38/+38
|
* Fix #3058 querystring: Fix incorrect handling of empty keysisaacs2012-05-111-0/+5
|
* lint, missed in QS speed mergeisaacs2012-02-221-1/+1
|
* Make QueryString.parse() even fasterBrian White2012-02-211-11/+13
|
* Lint all the JavaScripts.isaacs2012-02-181-3/+3
|
* Merge remote-tracking branch 'ry/v0.6'isaacs2012-02-061-3/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Make QueryString.parse run fasterPhilip Tellis2012-02-011-3/+11
| | | | | | | | | | | | | | Use decodeURIComponent when appropriate, and only fall back to querystring.decode if it throws, or if the character is a '+'. Fix #2248
* | querystring: fix maxKeys = 0 is ignoredFedor Indutny2012-01-161-1/+6
| |
* | http, querystring: added limits to prevent DoSFedor Indutny2012-01-161-3/+11
|/
* Fix #1707 hasOwnProperty usageisaacs2011-09-151-2/+5
| | | | | | | 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.
* Fix #1707 hasOwnProperty usageisaacs2011-09-151-1/+6
|
* Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty'isaacs2011-08-111-1/+1
|
* Update copyright headersRyan Dahl2011-03-141-0/+21
|
* url.parse(url, true) defaults query field to {}Jeremy Martin2010-12-201-1/+1
|
* more lintRyan Dahl2010-12-011-41/+29
|
* Add querystring.unescapeBufferRyan Dahl2010-11-181-2/+7
|
* query-string unescape moved to js landRyan Dahl2010-11-181-1/+71
|
* Get rid of PHP/Rails style parameter munging.Peter Griess2010-09-131-73/+56
| | | | | | - 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.
* querystring.parse: handle undefined value properlycloudhead2010-08-051-0/+1
|
* querystring: Removing typecasting of numeric strings to numbersMicheil Smith2010-07-191-1/+0
| | | | | The tests did not accurately test for a strict equality, meaning that the number == to the string.
* querystring.stringify is now more solidJan Kassens2010-07-191-29/+13
| | | | | * handles NaN and Infinity * works with arrays from other contexts
* Rewrote QueryString.parse to make it smaller and more effective.Dmitry Baranovskiy2010-06-291-99/+67
| | | | | Also added ability to parse foo.bar=4 equal to foo[bar]=4 Added tests for this as well
* Refactored isA, isBool, etc functions to use some of ES5 goodness.Dmitry Baranovskiy2010-06-291-30/+17
|
* A replacement for decodeURIComponent that doesn't throw.isaacs2010-06-151-23/+11
| | | | And add a few more tests.
* Allow callers to disable PHP/Rails style parameter mungeing in ↵Thomas Lee2010-04-281-4/+6
| | | | querystring.stringify
* Replace slow and broken for..in loops with faster for loops over the keys.Tim Caswell2010-04-121-6/+12
|
* trailing whitespace fixesisaacs2010-04-111-8/+8
|
* Bugfix in querystringRyan Dahl2010-03-051-1/+1
|
* Add URL and QueryString modules, and tests for each.isaacs2010-01-041-0/+177
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.