Commit Graph

39 Commits (851160e0aefd6e2dbb003799ae5deac9d3bfa80f)

Author SHA1 Message Date
Jonathan Ong 008f0554c6 set-type -> mime-types
removes mime dependencies from the dep tree.
liberally sets charset because some express users complained about bad
browsers using the default charset.
2014-06-03 21:44:25 -07:00
TJ Holowaychuk 15ab936001 change .status default to 404. Closes #263 2014-04-28 21:17:46 -07:00
dead_horse 48ac0669c5 fix content-length when body is re-assigned. Closes #267 2014-04-28 20:34:26 -07:00
TJ Holowaychuk 952dca336d rename setType -> getType
sounds weird
2014-04-28 20:12:53 -07:00
Jonathan Ong 163e59c0d5 refactor to use set-type 2014-04-27 01:53:07 -07:00
dead_horse 5de9d962a0 remove unused debug 2014-04-25 00:07:37 +08:00
Jonathan Ong e472a18010 refactor: use mime-extended 2014-04-19 07:45:57 -07:00
TJ Holowaychuk 990caf4e71 refactor 2014-04-14 15:36:39 -07:00
TJ Holowaychuk 95a78c3a44 Merge pull request #255 from dead-horse/stream-body
make sure all intermediate stream bodies will be destroy
2014-04-14 15:34:13 -07:00
TJ Holowaychuk bb0a0b3659 ocd 2014-04-12 10:59:04 -07:00
dead_horse 64aad129d3 fix this.status= in this.body
fix default status set bug in this.body=null.
do not call this.status= if this.status exist.
make sure empty content status remove content headers
2014-04-10 11:47:30 +08:00
TJ Holowaychuk 3d8ab61fa1 change res.type= to always default charset. Closes #252 2014-04-09 09:34:50 -07:00
dead_horse 329d2b94db make sure all intermediate stream bodies will be destroy and have error handle 2014-04-10 00:02:13 +08:00
Dmitry Mazuro 9e8d6a3aa0 ocd 2014-03-24 21:21:15 +03:00
Jonathan Ong c382305d4f refactor: use escape-html
dat SLOC
2014-03-12 18:30:16 -07:00
Jonathan Ong 182f9d6fa4 refactor: use statuses 2014-03-12 18:29:14 -07:00
TJ Holowaychuk 9b1651a8e6 fix inspection of app. Closes #108 2014-03-11 11:06:57 -07:00
TJ Holowaychuk b1f0abd16d Revert "add response.charset accessor and ctx.charset alias"
This reverts commit 94413b1bd4.
2014-03-06 18:05:01 -08:00
Jonathan Ong cb532b7bef this.writable to check if the socket is writable
because node sucks haha
2014-02-15 02:06:08 -08:00
TJ Holowaychuk 94413b1bd4 add response.charset accessor and ctx.charset alias 2014-02-14 09:33:10 -08:00
Jonathan Ong c7ff0e2ac1 response.body: fix html content sniffing for strings
closes #214
2014-02-13 18:35:25 -08:00
Jonathan Ong 3eb894ee85 res: 205 is a no body response code too!
not sure anyone cares enough about this for a test. plus, it’ll still
“work”
2013-12-30 22:25:44 -08:00
TJ Holowaychuk dc96d9828b refactor Response#status= 2013-12-30 10:04:34 -08:00
Jonathan Ong b7b1c0fd44 better 404 handling 2013-12-29 22:26:19 -08:00
Jonathan Ong 938a67c94f lint: remove unused requires
duh.
2013-12-19 21:16:19 -08:00
Jonathan Ong 34104c9af3 refactor: allow any streams with .pipe method 2013-12-19 21:14:47 -08:00
Jonathan Ong 0c330ffb1a lint: remove unused references, fix global leak 2013-12-09 01:53:18 -08:00
TJ Holowaychuk 8e10f12d38 add ctx.remove() and res.remove(). Closes #100 2013-11-24 05:06:35 -08:00
TJ Holowaychuk d23ad1a024 add .body to Response#inspect() 2013-11-14 11:34:55 -08:00
TJ Holowaychuk 35a0c1d2bb add {request,response,context}#toJSON() 2013-11-14 11:30:56 -08:00
TJ Holowaychuk db22fba86d Merge branch 'master' of github.com:koajs/koa 2013-11-14 11:23:17 -08:00
TJ Holowaychuk 64fa0b5c2a Merge pull request #85 from koajs/expose-proto
Expose proto
2013-11-14 11:23:10 -08:00
TJ Holowaychuk d247e7835c Merge branch 'master' of github.com:koajs/koa 2013-11-13 21:11:28 -08:00
Jonathan Ong e51e85e0fc response.etag: remove getter for now
until we figure out a good way to return both weak and strong validators
2013-11-13 21:04:40 -08:00
TJ Holowaychuk 088fcfd3a6 refactor res.etag= regexp 2013-11-13 20:48:57 -08:00
Jonathan Ong 2f74207e6c response.etag and response.lastModified 2013-11-13 19:59:49 -08:00
Jonathan Ong 0be1442111 expose app-specific prototypes, cleanup/fix tests 2013-11-13 18:41:40 -08:00
TJ Holowaychuk 93f1bce66f fix ctx.ip
need tests for this
2013-11-13 13:17:16 -08:00
TJ Holowaychuk c699c75c52 add koa Request / Response objects and delegation. Closes #52 2013-11-13 09:01:15 -08:00