Commit Graph

70 Commits (d134fff9e82d050e81bf579a693ed2114e7946c6)

Author SHA1 Message Date
Slobodan Stojanovic 0470997854 Remove 'TODO' comment for this.res._headers
Node probably doesn't plan to change this so there's no point of having 'TODO' comment in the code.
2015-10-31 19:21:40 +01:00
Slobodan Stojanovic b08facb7bd Fix indentation and add .eslint rules
closes #555
2015-10-29 09:55:34 -07:00
jongleberry 16db0f60c4 eslint: add no-var rule 2015-10-22 15:46:47 -07:00
Santiago Sotomayor 0c438ed435 unset content-type when the type is unknown
closes #532
closes #536
2015-10-22 15:39:16 -07:00
Robert Sköld e900f0a44a Use shorthand functions
closes #519
2015-10-12 00:00:41 -07:00
Tejas Manohar ed19e67055 refactor to use ES6 template strings
replace string interp w/ templates in core

use string templating es6 in benchmarks

template strings in tests dir
2015-10-11 21:22:33 -07:00
Tejas Manohar 9f27c1c414 refactor to use ES6 const
change var to const for static require()'d modules

make constant var references in app use const keyword

refactor context to use es6 constants

refactor request to use es6 constants, let block-scope coming next

use const in response object for static refs

make context tests use es6 constants

experimental unit tests -> const

use const for static references in unit test over req

use const for static refs in res tests

update app tests to use const for static refs

make the context test use es6 constants for static refs

use constants in the README
es6 constants seem to work in --harmony on 0.12 too

use const's for immutable refs in benchmarks

ensure all JS files have blank newline at top

add newline to bottom of file where missing

add a webchat freenode link to irc channel

no need to assign error in catch{}-able test

app.silent option to turn off err logging

keep test env logging for backwards-compat
2015-10-11 21:22:33 -07:00
Tejas Manohar 0b1b49cb8a use strict in all .js files
closes #508
2015-10-11 16:08:32 -07:00
dead_horse 36a933375b fix comment 2015-08-25 16:49:05 +08:00
dead_horse c8eb5eefb1 make sure helpers return strict string 2015-04-29 01:44:02 +08:00
dead_horse 1c5cb6f691 feat: alias response.headers to response.header 2015-04-23 17:28:31 +08:00
Jesus Rodriguez 68843e0cb3 Remove unused imports and exports 2015-01-29 15:39:06 -08:00
TJ Holowaychuk 255a39b876 refactor res.append()
OCDOCDOCD
2015-01-27 10:14:57 -08:00
dead_horse 5a3f32dfdd Add res.append(field, val) to append headers 2015-01-26 02:20:08 +08:00
zensh 28ec7892a8 remove unnecessary "require('http')" 2014-11-29 09:42:01 +08:00
dead_horse 57eb6a10df set content-type for redirect when accpect plain 2014-11-27 09:25:44 -08:00
dead_horse eff4886cd8 ocd 2014-11-16 21:52:14 +08:00
dead_horse efdd7d3716 less strict for status, close #350
add res.message[=]
2014-10-09 23:20:53 +08:00
fengmk2 cca2438f64 ctx.attachment support no-ascii filename 2014-09-19 13:46:08 +08:00
Jonathan Ong 9455726c00 finished -> on-finished
removes the writable test because it’s fake and there are tests for
on-finished for this case
2014-08-16 02:58:06 -07:00
Jonathan Ong 920909c546 dethroy -> destroy 2014-08-14 23:34:25 -07:00
Jonathan Ong 31ba115231 res: add .is() 2014-06-13 00:30:59 -07:00
TJ Holowaychuk 696d55d73b refactor res.status= 2014-06-10 14:33:13 -07:00
TJ Holowaychuk ed8beb7d79 Merge pull request #299 from tmilewski/remove-status-as-string
remove .status=string
2014-06-10 14:32:13 -07:00
TJ Holowaychuk 71536b35be remove res.statusString 2014-06-10 14:31:41 -07:00
tmilewski c2322f2b3d remove .status=string #298 2014-06-10 16:38:25 -04:00
Jonathan Ong dc59a604e5 Merge pull request #292 from koajs/context-delegate
context: delegate etag/last-modified
2014-06-07 03:39:19 -07:00
TJ Holowaychuk 63a4297084 Merge pull request #291 from koajs/vary
remove response.append(), use vary module
2014-06-06 23:00:39 -07:00
Jonathan Ong 1a32ecac31 fix res.type= for unknown types
because we changed from mime to mime-types. ideally, we should just not
set the content-type, but this way it’s backwards compatible. we can
change it later.
2014-06-06 16:26:03 -07:00
Jonathan Ong 01dd6a33c5 context: delegate etag/last-modified 2014-06-05 16:19:29 -07:00
Jonathan Ong fdbd16acc3 remove response.append(), use vary module 2014-06-05 16:06:15 -07:00
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