Commit graph

68 commits

Author SHA1 Message Date
TJ Holowaychuk
11913f5e4e add ctx.body= setter
this prevents a bunch of redundant checks that middleware may need to
check response length, type etc. the less code floating around based
on our supported response body types the better, giving us more freedom
to change these as needed, and just less error-prone code in general.
2013-09-14 15:54:17 -07:00
TJ Holowaychuk
04f4d72692 add charset support to ctx.type= 2013-09-14 14:48:33 -07:00
TJ Holowaychuk
fc25b79b99 add err.expose check for response handler to expose the err.message 2013-09-12 08:05:50 -07:00
TJ Holowaychuk
091d5010cd add ENOENT err.code support for 404 2013-09-08 12:11:02 -07:00
TJ Holowaychuk
228c38cf3e fix text/plain response for 500 errors 2013-09-08 12:07:50 -07:00
TJ Holowaychuk
92b741ac0a remove socket error handling, use server "clientError" 2013-09-08 11:44:45 -07:00
TJ Holowaychuk
2fe83a4e3d add failing socket error handling test 2013-09-08 11:41:43 -07:00
TJ Holowaychuk
42f5aa1e61 add app "error" test 2013-09-08 09:37:19 -07:00
TJ Holowaychuk
3758f4b675 use app.listen() in tests 2013-09-01 15:07:54 -07:00
TJ Holowaychuk
ad0dd3cc39 add Context#error(). Closes #31 2013-08-27 20:54:13 -07:00
TJ Holowaychuk
6fb32165e3 fix .status= case sensitivity 2013-08-22 21:10:59 -07:00
TJ Holowaychuk
2de010ca47 add err.status support. Closes #20 2013-08-21 19:47:56 -07:00
TJ Holowaychuk
e24334e820 add test for 304 as well 2013-08-20 21:30:55 -07:00
TJ Holowaychuk
1457a3df0f add striping of Content-* fields when 204 / 304. Closes #21 2013-08-20 21:24:18 -07:00
TJ Holowaychuk
3d92717b7a remove Context#auth. Closes #26 2013-08-19 18:24:17 -07:00
TJ Holowaychuk
d9e8bb711e misc 2013-08-18 11:16:02 -07:00
Jonathan Ong
978f581099 app.context: extend the context with your own properties 2013-08-17 16:58:53 -07:00
TJ Holowaychuk
9e167c5ed9 Initial commit 2013-08-17 00:15:57 -07:00