Commit Graph

1242 Commits

Author SHA1 Message Date
Douglas Christopher Wilson
69997cbdbe examples: fix error handling in auth example 2022-02-02 00:44:28 -05:00
Czarek
450c468d04 Change query parser setting default to 'simple'
closes #3361
closes #3621
2021-12-17 23:15:29 -05:00
Douglas Christopher Wilson
af341b0f09 deps: body-parser@2.0.0-beta.1 2021-12-17 23:02:38 -05:00
Douglas Christopher Wilson
1574925cad deps: router@2.0.0-beta.1
closes #4321
2021-12-16 23:05:41 -05:00
Douglas Christopher Wilson
c7d528cdc0 Merge tag '4.17.2' 2021-12-16 23:01:28 -05:00
Douglas Christopher Wilson
eee93a2760 build: update example dependencies 2021-12-16 21:47:10 -05:00
Aalaap Ghag
21cf522dcd examples: improve 404 message wording
closes #4471
2021-12-16 13:00:12 -05:00
Douglas Christopher Wilson
3bb6d96ba9 examples: demonstrate sub directory download 2021-12-15 21:06:33 -05:00
Andy
e242796eb3 tests: fix test in app.head
closes #4765
2021-12-04 09:36:34 -05:00
drewm
f275e87dff Fix handling of undefined when "json escape" is enabled
closes #4744
2021-11-17 00:00:56 -05:00
Douglas Christopher Wilson
9dd0e7afdb Fix handling of undefined in res.jsonp 2021-11-16 23:58:17 -05:00
Douglas Christopher Wilson
1b2f3a0698 tests: fix up primitive tests for res.jsonp 2021-11-16 23:53:10 -05:00
3imed-jaberi
519126d732 deps: cookie@0.4.1
closes #4337
2021-11-16 21:59:01 -05:00
Ivan Derevianko
99a369f3d5 Fix incorrect middleware execution with unanchored RegExps
fixes #4204
closes #4205
2021-11-16 21:52:11 -05:00
Juan José Arboleda
dab6ee5822 tests: remove extraneous code from app.listen test
closes #4714
2021-11-15 23:56:46 -05:00
Hussein Mohamed
52e9bd67b7 tests: fix typos
closes #4564
2021-07-31 16:00:16 -04:00
Douglas Christopher Wilson
8e4add7f74 tests: remove should usage from Router tests
fixes #4635
2021-07-30 16:19:55 -04:00
Douglas Christopher Wilson
121fe9982b Merge tag '4.17.1' 2019-06-08 19:43:21 -04:00
Douglas Christopher Wilson
0a48e18056 Revert "Improve error message for null/undefined to res.status"
fixes #3968
2019-05-25 18:15:13 -04:00
Douglas Christopher Wilson
88f9733ffa deps: serve-static@1.14.1 2019-05-11 19:29:33 -04:00
Douglas Christopher Wilson
bb5211fa1c tests: add express.text test suite 2019-05-08 23:39:45 -04:00
Ilya Guterman
7f4e37f3ea Add express.text to parse bodies into string
closes #3455
2019-05-08 23:39:16 -04:00
Douglas Christopher Wilson
11192bd168 tests: add express.raw test suite 2019-05-08 00:58:08 -04:00
Amit Zur
0bcdd88dd0 Add express.raw to parse bodies into Buffer
closes #3708
2019-05-08 00:57:02 -04:00
Douglas Christopher Wilson
6f7a8301a1 tests: add express.static test suite 2019-05-02 17:49:29 -04:00
Douglas Christopher Wilson
8b71f39516 tests: add express.urlencoded test suite 2019-05-01 23:29:28 -04:00
Douglas Christopher Wilson
955f2a5f78 tests: add express.json test suite 2019-05-01 22:59:42 -04:00
Douglas Christopher Wilson
32f5293afa deps: qs@6.7.0 2019-04-30 23:06:50 -04:00
김정환
8a97346eaf tests: assert calls order in middleware basic tests
closes #3878
2019-04-17 10:41:43 -04:00
김정환
b9b1b19758 tests: fix typos in descriptions
closes #3875
2019-04-16 12:40:59 -04:00
Horatiu Eugen Vlad
b93ffd4bdc Support multiple hosts in X-Forwarded-Host
fixes #3494
closes #3495
2018-10-28 15:58:25 -04:00
Joshua Caron
8da51108e7 Improve error message for null/undefined to res.status
closes #2795
closes #2797
closes #3111
2018-10-27 14:04:49 -04:00
void
6bcdfef6ad Improve error message for non-strings to res.sendFile
closes #3582
2018-10-27 02:27:15 -04:00
Douglas Christopher Wilson
d0421ac7e1 tests: use supertest to perform assertions 2018-10-26 23:34:00 -04:00
Douglas Christopher Wilson
c82fa19447 tests: add router promise tests 2018-10-26 21:31:28 -04:00
Douglas Christopher Wilson
302a6152b4 Merge tag '4.16.4' 2018-10-23 20:38:42 -04:00
Douglas Christopher Wilson
451ee5d9c1 build: supertest@3.3.0 2018-09-24 23:40:21 -04:00
Douglas Christopher Wilson
f07f368fba build: mocha@5.2.0 2018-09-21 23:16:17 -04:00
Douglas Christopher Wilson
3d10279826 Fix issue where "Request aborted" may be logged in res.sendfile 2018-09-19 23:25:16 -04:00
Logan Ripplinger
ede24da964 examples: fix typo in multi-router example
closes #3718
2018-09-13 18:15:48 -04:00
Alejandro Estrada
40e04ec7a6 lint: remove usages of "=="
closes #3540
2018-02-13 19:30:57 -05:00
Douglas Christopher Wilson
972ada9079 tests: remove duplicate block in router test 2018-02-13 17:14:48 -05:00
Douglas Christopher Wilson
94a6cbfbfe tests: remove unnecessary functions for supertest 2018-01-17 00:28:25 -05:00
Douglas Christopher Wilson
f8fba68ec0 tests: use supertest expect to test body 2018-01-17 00:20:15 -05:00
chainhelen
950f4423f0 tests: separate res.send() chain test
closes #3448
2018-01-02 19:26:27 -05:00
Yaman Jain
53bee2506d examples: use https github url
closes #3465
2018-01-02 19:05:52 -05:00
Douglas Christopher Wilson
62e12fe710 Merge tag '4.16.2' 2017-10-13 22:27:30 -04:00
David Wood
b7817ab1b0 Fix TypeError in res.send when given Buffer and ETag header set
fixes #3445
2017-10-09 22:11:49 -04:00
Douglas Christopher Wilson
de129c289d tests: run mocha with --no-exit to detect hangs
closes #3439
2017-10-01 00:48:29 -04:00
Douglas Christopher Wilson
c0136d8b48 Add express.json and express.urlencoded to parse bodies
closes #2211
2017-09-28 13:22:36 -04:00
Daniel Tschinder
41964580a8 deps: send@0.16.0
closes #3431
closes #3435
2017-09-28 12:39:05 -04:00
Douglas Christopher Wilson
ddeb71301c tests: add maxAge option tests for res.sendFile 2017-09-28 12:32:27 -04:00
Greg Guthe
7154014785 Add "escape json" setting for res.json and res.jsonp
closes #3268
closes #3269
2017-09-28 12:03:42 -04:00
Aaron Clover
a24fd0ca6c Add options to res.download
closes #3327
closes #3370
2017-09-28 11:11:08 -04:00
Hrvoje Šimić
2df1ad26a5 Improve error messages when non-function provided as middleware
closes #3426
2017-09-28 09:20:37 -04:00
Douglas Christopher Wilson
12c3712468 Use safe-buffer for improved Buffer API 2017-09-28 08:26:39 -04:00
Douglas Christopher Wilson
80f1ea9bec Improve error message when autoloading invalid view engine
fixes #3403
2017-09-25 21:11:33 -04:00
Douglas Christopher Wilson
19c8d64855 Merge tag '4.15.5' 2017-09-25 01:07:08 -04:00
Kunal Pathak
19a2eeb476 tests: check render error without engine-specific message
closes #3251
2017-09-21 22:45:26 -04:00
Mike Tunnicliffe
71395f5933 Remove res.redirect(url, status) signature
closes #2941
2017-08-07 20:17:52 -04:00
Mike Tunnicliffe
e3bd14dcca Remove res.send(status, body) signature
closes #2942
2017-08-07 20:06:44 -04:00
Douglas Christopher Wilson
c319fe260a Merge tag '4.15.4' 2017-08-07 19:33:00 -04:00
Douglas Christopher Wilson
e0066227f7 lint: remove all unused varaibles 2017-08-06 00:19:32 -04:00
Douglas Christopher Wilson
56e90e3c72 lint: add eslint rules that cover editorconfig 2017-08-05 23:37:39 -04:00
Daniel Walasek
713d2aed93 tests: fix incorrect should usage
closes #3387
2017-08-05 20:10:35 -04:00
Owen Luke
5e16f400f1 examples: use 1-based visitor count in cookie-sessions
closes #3312
2017-07-26 13:05:41 -04:00
Owen Luke
fde8f647d3 examples: fix route in params example
closes #3310
2017-05-17 21:14:47 -04:00
Oz Michaeli
ae0b630ac7 Fix error when res.set cannot add charset to Content-Type
fixes #3303
closes #3305
closes #3307
2017-05-14 23:58:25 -04:00
Colin Richardson
a13938eed7 tests: add tests for res.location('back')
closes #3292
closes #3293
2017-05-07 19:26:33 -04:00
Douglas Christopher Wilson
e5dbb0cb4e Merge tag '4.15.2' 2017-03-06 08:40:02 -05:00
chainhelen
eece3850bc tests: use path.join instead of concatenation
closes #3236
2017-03-05 23:08:47 -05:00
Douglas Christopher Wilson
dc8acc8676 tests: use supertest expect for simple assertions 2017-03-05 00:04:47 -05:00
Wes
06f423d4f5 Remove Express 3.x middleware error stubs
closes #3217
2017-03-01 18:29:48 -05:00
Douglas Christopher Wilson
501e24e0a9 Merge tag '4.15.0' 2017-03-01 18:17:04 -05:00
Blake Embrey
9722202df9 Add next("router") to exit from router
closes #2241
closes #2371
2017-02-26 14:38:05 -05:00
Douglas Christopher Wilson
51f52901eb Fix case where router.use skipped requests routes did not
fixes #3037
2017-02-26 13:59:47 -05:00
Douglas Christopher Wilson
1f71fae23b tests: add lone "*" route tests 2017-02-26 13:21:18 -05:00
Douglas Christopher Wilson
668f545fd4 Skip routing when req.url is not set 2017-02-22 23:42:57 -05:00
Wes
034165caeb Use statuses instead of http module for status messages
closes #3215
2017-02-22 02:16:52 -05:00
Douglas Christopher Wilson
f87abb3493 Remove usage of res._headers private field
closes #3174
2017-02-20 22:08:33 -05:00
Douglas Christopher Wilson
9f4dbae083 deps: etag@~1.8.0 2017-02-20 21:25:26 -05:00
Douglas Christopher Wilson
92c859dd05 deps: finalhandler@~1.0.0 2017-02-20 21:24:54 -05:00
Douglas Christopher Wilson
3e3d35777d tests: update req.range tests to run through express 2017-02-20 17:09:21 -05:00
Douglas Christopher Wilson
eb326d7ecb tests: update req.is tests to run through express 2017-02-20 16:55:15 -05:00
Sebastian Van Sande
abd1de73c1 tests: fix misnamed app.router test section
fixes #3194
closes #3199
2017-02-07 19:42:35 -05:00
Douglas Christopher Wilson
fb3946f454 lint: fix broken indentation in tests 2017-02-04 20:54:47 -05:00
Douglas Christopher Wilson
bcbb9d56c5 Merge tag '4.14.1' 2017-01-28 21:02:36 -05:00
Mike Tunnicliffe
ab1c9e924e Remove res.jsonp(status, obj) signature
closes #2940
2017-01-27 23:53:41 -05:00
Mike Tunnicliffe
25fdefac45 Remove res.json(status, obj) signature
closes #2939
2017-01-27 23:46:54 -05:00
Mike Tunnicliffe
a856456a95 Remove res.vary() (no arguments) signature
closes #2943
2017-01-27 22:04:36 -05:00
Zachary Lester
6723b4419a tests: add test for res.sendFile "cacheContol" option
closes #3061
2017-01-21 00:33:29 -05:00
Vishvajit Pathak
bd47aeb88d tests: fix typos in test descriptions
closes #3129
closes #3130
2016-11-18 13:47:28 -05:00
Douglas Christopher Wilson
1dbfee6623 Merge tag '4.14.0' 2016-06-20 00:37:34 -04:00
Douglas Christopher Wilson
76eaa326ee Encode URL in res.location/res.redirect if not already encoded
fixes #2897
fixes #3003
2016-06-13 23:23:29 -04:00
Douglas Christopher Wilson
fc40702cb7 deps: send@0.14.1 2016-06-12 22:33:44 -04:00
Douglas Christopher Wilson
c762b16f62 Improve error with invalid arguments to req.get()
fixes #2993
2016-06-03 00:07:34 -04:00
Douglas Christopher Wilson
5d642af8c3 Add "options" argument to req.range 2016-06-01 19:13:36 -04:00
Douglas Christopher Wilson
8ddab697cc build: supertest@1.2.0 2016-06-01 17:31:10 -04:00
huaoguo
2e1284beb6 Fix Windows absolute path check using forward slashes
closes #3017
2016-06-01 16:47:03 -04:00
Douglas Christopher Wilson
31dd549f35 tests: add test for dispatching to empty route 2016-05-23 23:03:13 -04:00
Douglas Christopher Wilson
12bc16e72f tests: use supertest to check response header values
closes #2983
closes #2992
2016-05-11 08:50:38 +02:00
Linus Unnebäck
bb84cf955f tests: add test for signed cookie without secret
closes #2986
2016-05-10 11:54:52 -04:00
Douglas Christopher Wilson
7cafdb5824 Merge tag '4.13.4' 2016-01-21 21:23:07 -05:00
Douglas Christopher Wilson
e7a02f6a25 build: move repository to expressjs 2016-01-21 20:59:53 -05:00
Ricardo Bin
7a3b5aea11 tests: add test for res.send() without arguments
closes #2778
closes #2783
2015-11-07 00:25:06 -05:00
Brendan Ashworth
2f8ac6726f tests: fix redirect tests for change in 302 status message
closes #2690
2015-08-03 15:54:03 -04:00
Douglas Christopher Wilson
11a77a3fff Fix inner numeric indices incorrectly altering parent req.params 2015-08-03 01:01:16 -04:00
Douglas Christopher Wilson
ee90042d0c Fix infinite loop condition using mergeParams: true 2015-08-03 00:50:48 -04:00
Blake Embrey
e33c5035bb deps: path-to-regexp@0.1.7
closes #2717
2015-07-31 16:58:57 -04:00
Douglas Christopher Wilson
de7ffca33f tests: add test for matching route after error 2015-07-24 21:36:56 -04:00
Jeremiah Senkpiel
694869d2aa Use path-is-absolute module for absolute path detection
closes #2620
2015-07-06 23:55:17 -04:00
Douglas Christopher Wilson
cec5780db4 Use router module for routing
closes #2411
2015-07-06 23:46:00 -04:00
Douglas Christopher Wilson
21d52daafb Remove req.param() 2015-07-06 21:15:16 -04:00
Douglas Christopher Wilson
6c751191dd Remove utils.flatten 2015-07-06 21:12:44 -04:00
Douglas Christopher Wilson
1e2951a832 Remove app.param(fn) signature 2015-07-06 16:45:09 -04:00
Douglas Christopher Wilson
3a1f27fcde Remove ":" stripping from app.param() 2015-07-06 16:31:51 -04:00
Douglas Christopher Wilson
b309b873f1 Merge tag '4.13.1' 2015-07-06 16:13:54 -04:00
Douglas Christopher Wilson
7bea53b92b deps: qs@4.0.0 2015-07-06 01:20:09 -04:00
Douglas Christopher Wilson
0634e7e189 tests: add test for rendering extensionless file without view engine 2015-06-20 12:54:52 -04:00
Blake Embrey
60e2008dee deps: path-to-regexp@0.1.6
fixes #2491
fixes #2617
closes #2637
closes #2683
2015-06-19 09:59:33 -04:00
Behcet Uyar
24d1c98c0a Fix res.format error when only default provided
fixes #2665
2015-06-18 23:08:34 -04:00
Radu Dan
8da51e3acc Fix issue where next('route') in app.param would incorrectly skip values
fixes #2655
2015-06-18 22:14:37 -04:00
Douglas Christopher Wilson
3d2ecdd5fa Merge tag '3.21.0' 2015-06-18 22:10:21 -04:00
Douglas Christopher Wilson
c8d61b6269 deps: etag@~1.7.0
fixes #2667
2015-06-18 20:54:26 -04:00
Douglas Christopher Wilson
f90e045334 Merge tag '4.12.4' 2015-05-18 00:41:42 -04:00
Douglas Christopher Wilson
62d5c38575 Merge tag '3.20.3' 2015-05-18 00:12:01 -04:00
Douglas Christopher Wilson
7df8fa3be5 deps: supertest@1.0.1 2015-05-17 23:44:09 -04:00
Ignacio Carbajo
ea6e4d3b6f tests: add a missing test description
closes #2631
2015-05-01 22:12:09 -04:00
Douglas Christopher Wilson
c894c84e4a build: support io.js 1.x
closes #2539
2015-03-17 02:09:39 -04:00
Douglas Christopher Wilson
40f4ac3cb3 Merge tag '3.20.2' 2015-03-17 01:52:23 -04:00
Phat
1114ca1ab6 tests: fix assert usage mistake
fixes #2592
2015-03-17 01:19:38 -04:00
Douglas Christopher Wilson
389ab1b19f tests: add test for cookie-sessions example 2015-03-17 01:02:08 -04:00
Douglas Christopher Wilson
dbc61fc191 Fix wrong code on aborted connections from res.sendFile 2015-03-01 17:27:50 -05:00
Douglas Christopher Wilson
cd6df7699d Merge tag '3.20.1' 2015-02-28 23:29:23 -05:00
Douglas Christopher Wilson
2e0f5e7817 Fix req.host when using "trust proxy" hops count 2015-02-28 21:32:51 -05:00
Paul Serby
20aa12616a Fix req.protocol/req.secure when using "trust proxy" hops count
fixes #2569
closes #2570
2015-02-28 21:29:43 -05:00
Douglas Christopher Wilson
f6ec710534 Merge tag '4.12.0' 2015-02-23 01:00:12 -05:00
Seth Krasnianski
8fe5fd89c6 tests: fix error-handling typo
closes #2557
2015-02-22 22:30:22 -05:00
Douglas Christopher Wilson
53e5991dd1 tests: add extra setCharset tests 2015-02-18 22:57:50 -05:00
Douglas Christopher Wilson
531f024e48 Merge tag '3.20.0' 2015-02-18 22:33:47 -05:00
Douglas Christopher Wilson
b40e74d6b6 Fix "trust proxy" setting to inherit when app is mounted
fixes #2550
fixes #2551
2015-02-18 00:59:56 -05:00
Douglas Christopher Wilson
eaf3318dd3 Generate ETags for all request responses
closes #2546
2015-02-18 00:12:28 -05:00
Douglas Christopher Wilson
ca480d7043 tests: improve res.download tests 2015-02-16 17:54:36 -05:00
Douglas Christopher Wilson
8a5ecd3d89 Merge tag '4.11.1' 2015-01-21 03:58:41 -05:00
Douglas Christopher Wilson
41f8435d32 tests: fix failing test on Node.js 0.11.15 2015-01-21 03:28:57 -05:00
Douglas Christopher Wilson
82689d68cf Merge tag '3.19.1' 2015-01-21 03:24:31 -05:00
Douglas Christopher Wilson
855176b633 tests: remove more mocking uses 2015-01-21 03:17:30 -05:00
Douglas Christopher Wilson
f6f78e5f02 Add res.append(field, val) to append headers
closes #2455
2015-01-13 21:07:00 -05:00
Douglas Christopher Wilson
ec8daf0e7b Match routes iteratively to prevent stack overflows
fixes #2412
2015-01-13 15:33:54 -05:00
Douglas Christopher Wilson
935f05bc84 Fix OPTIONS responses to include the HEAD method properly
fixes #2459
2015-01-13 13:26:19 -05:00