00:00:31  * oscargodsonquit (Read error: Connection reset by peer)
00:00:45  * oscargodsonjoined
00:04:45  * ramitosquit (Remote host closed the connection)
00:05:16  * ramitosjoined
00:41:40  * basicdaysjoined
00:54:18  * oscargodsonquit (Ping timeout: 260 seconds)
01:25:24  * basicdaysquit (Ping timeout: 250 seconds)
01:29:44  * bmacjoined
01:34:10  * bmacquit (Ping timeout: 264 seconds)
01:37:36  * wilmoorejoined
01:49:43  * wilmoorequit (Ping timeout: 256 seconds)
01:59:43  * kievechuajoined
02:03:36  * TheAceOfHeartsquit (Quit: Leaving.)
02:13:56  * navaruquit (Remote host closed the connection)
02:22:21  * bmacjoined
02:22:26  * kievechuaquit (Quit: kievechua)
02:23:12  * basicdaysjoined
02:35:06  * TheAceOfHeartsjoined
02:36:22  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:36:51  * kievechuajoined
02:44:53  * navarujoined
02:49:11  * navaruquit (Ping timeout: 255 seconds)
03:45:47  * navarujoined
03:50:23  * navaruquit (Ping timeout: 255 seconds)
04:20:45  * kievechuaquit (Quit: kievechua)
04:25:15  * oscargodsonjoined
04:33:52  * kievechuajoined
04:45:57  * TheAceOfHeartsquit (Quit: Leaving.)
04:46:13  * navarujoined
04:50:22  * navaruquit (Ping timeout: 240 seconds)
04:53:33  * feelfinejoined
05:13:27  * TheAceOfHeartsjoined
05:17:49  * basicdaysquit (Quit: I'm out)
05:21:24  * navarujoined
05:33:37  * kievechuaquit (Quit: kievechua)
05:36:05  * oscargodsonquit
05:43:21  * wilmoorejoined
05:52:54  * TheAceOfHeartsquit (Quit: Leaving.)
06:54:43  * occultusquit (Quit: sleep)
07:00:09  * joshonthewebjoined
07:29:40  * wilmoorequit (Ping timeout: 255 seconds)
07:31:34  * raboidjoined
07:33:12  * kievechuajoined
07:35:52  * raboidquit (Ping timeout: 240 seconds)
07:48:27  * joshonthewebquit (Quit: Textual IRC Client: http://www.textualapp.com/)
07:49:50  * joshonthewebjoined
08:00:28  * dobsonjoined
08:02:57  * LeXXikjoined
08:05:57  * raboidjoined
08:28:10  * raboidquit (Remote host closed the connection)
08:49:30  * kievechuaquit (Quit: kievechua)
09:06:03  * LeXXikquit (Ping timeout: 240 seconds)
09:25:07  * LeXXikjoined
09:31:10  * LeXXikquit (Ping timeout: 255 seconds)
09:48:02  * TheAceOfHeartsjoined
10:00:36  * iliakanjoined
10:01:21  <iliakan>how does Koa determine that I have charset="utf-8" ?
10:01:42  <iliakan>usually, with my middlewares I have charset="utf-8" by default,
10:01:48  <iliakan>but with koa-send, I have no charset.
10:02:10  <iliakan>I want utf-8 to be on statically sent files too, where's the right place to set it?
10:09:43  <TheAceOfHearts>isn't that just like: "Content-Type": "application/json; utf-8" or w/e charset it has?
10:10:30  <TheAceOfHearts>or well
10:10:47  <TheAceOfHearts> "Content-Type": "application/json; charset=utf-8"
10:10:49  <TheAceOfHearts>maybe, idk
10:18:49  * kievechuajoined
10:19:07  <iliakan>found the place
10:19:29  <iliakan>right after yield* send
10:19:36  <iliakan>if the path ends with .js, I add utf-8
10:20:16  <iliakan>maybe (just maybe) koa should add utf-8 charset to js by default
10:25:52  <jongleberry>iliakan: so koa uses this: https://github.com/expressjs/mime-types#mimecontenttypetype
10:26:08  <iliakan>johngleberry: yes, and it does not add utf-8 to application/javascript
10:26:13  <jongleberry>basically, if it's some sort of "text" type and there's no charset field, then it automatically adds utf-8
10:26:22  <jongleberry>so if you don't want utf-8, just send your own charset
10:26:31  <iliakan>I'm not sure, but maybe application/javascript should have the default charset utf-8 too
10:26:36  <jongleberry>does it not?
10:26:43  <iliakan>no, it's not text/*
10:26:59  <iliakan>application/json gets utf-8
10:27:01  <jongleberry>oh
10:27:01  <jongleberry>got it
10:27:04  <iliakan>but application/javascript does not
10:27:08  <iliakan>I'll send the PR to that module
10:27:14  <jongleberry>yeah i'm for it
10:27:18  <jongleberry>see what other people say
10:27:24  <jongleberry>i think there was an issue with this in express
10:27:34  <jongleberry>not sure what ended upb eing the consensus
10:28:01  <jongleberry>iirc there were some stupid browsers taht decided to use whatever charset they'd like
10:30:43  <iliakan>submitted it https://github.com/expressjs/mime-types/pull/10, let's hear any contras
10:31:16  <iliakan>in nginx I always use utf-8 for such static for over a decade
10:32:28  <TheAceOfHearts>ah, character encodings
10:33:44  <TheAceOfHearts>you know what's truly evil? CSVs from the real world
10:34:16  * boredzjoined
10:35:58  <jongleberry>no thanks ~_~
10:42:08  * boredzquit (Quit: Leaving)
11:08:50  * feelfinequit (Remote host closed the connection)
11:23:22  * kievechuaquit (Quit: kievechua)
11:24:50  * kievechuajoined
11:40:15  * kievechuaquit (Quit: kievechua)
11:46:48  * iliakanquit (Ping timeout: 256 seconds)
11:55:12  * kievechuajoined
12:31:02  * TheAceOfHeartsquit (Quit: Leaving.)
13:27:37  * navaruquit (Remote host closed the connection)
13:28:12  * roymilohjoined
13:43:44  * bmacjoined
13:43:53  * navarujoined
13:53:00  * __quimjoined
13:56:48  * kazuponjoined
14:37:07  * navaruquit (Remote host closed the connection)
15:04:30  * kazuponquit (Remote host closed the connection)
15:04:57  * kazuponjoined
15:09:26  * kazuponquit (Ping timeout: 255 seconds)
15:16:09  * kievechuaquit (Quit: kievechua)
15:35:44  * raboidjoined
15:38:21  * kazuponjoined
15:42:51  * __quimquit (Quit: Leaving...)
15:43:46  * kazuponquit (Ping timeout: 264 seconds)
15:51:45  * navarujoined
15:58:27  * roymilohquit (Remote host closed the connection)
15:58:52  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:59:04  * roymilohjoined
16:03:32  * roymilohquit (Ping timeout: 245 seconds)
16:08:36  * joshonthewebquit (Quit: Computer has gone to sleep.)
16:13:20  * kievechuajoined
16:15:47  * occultusjoined
16:31:29  * roymilohjoined
16:34:25  <raboid>how do you guys handle parameter validation? I'm thinking of using a middleware that looks in an object that has the valid params defined for each route. Then this would yield to the router. Right now I'm doing it after the router inside each request handler
16:35:11  * kievechuaquit (Quit: kievechua)
16:35:44  * roymilohquit (Ping timeout: 250 seconds)
16:39:26  * kazuponjoined
16:44:26  * kazuponquit (Ping timeout: 260 seconds)
16:48:07  * oscargodsonjoined
16:54:12  * boredzjoined
16:54:32  * raboidquit (Remote host closed the connection)
17:08:37  * boredzquit (Quit: Leaving)
17:25:12  * ramitosquit (Ping timeout: 244 seconds)
17:26:06  * oscargodsonquit (Read error: Connection reset by peer)
17:27:01  * oscargodsonjoined
17:31:51  * wilmoorejoined
17:36:11  * ramitosjoined
17:39:35  * joshonthewebjoined
17:40:12  * kazuponjoined
17:45:06  * kazuponquit (Ping timeout: 260 seconds)
17:48:40  * raboidjoined
17:49:14  * joshonthewebquit (Quit: Computer has gone to sleep.)
17:52:24  * raboidquit (Client Quit)
18:04:31  * roymilohjoined
18:05:30  * ramitosquit (Ping timeout: 244 seconds)
18:06:37  * ramitosjoined
18:08:00  * oscargod_joined
18:10:11  * oscargodsonquit (Ping timeout: 264 seconds)
18:15:07  * feelfinejoined
18:31:46  * oscargod_quit (Quit: Computer has gone to sleep.)
18:40:58  * kazuponjoined
18:42:47  * kazuponquit (Read error: Connection reset by peer)
18:43:00  * kazuponjoined
18:48:08  * kazuponquit (Ping timeout: 255 seconds)
18:49:52  * oscargodsonjoined
18:50:54  * TheAceOfHeartsjoined
19:33:01  * oscargodsonquit (Quit: Computer has gone to sleep.)
19:44:01  * kazuponjoined
19:48:33  * kazuponquit (Ping timeout: 240 seconds)
19:55:56  * feelfinequit (Remote host closed the connection)
19:56:46  * feelfinejoined
20:20:54  * feelfinequit (Remote host closed the connection)
20:24:56  * feelfinejoined
20:44:49  * kazuponjoined
20:49:46  * kazuponquit (Ping timeout: 264 seconds)
21:08:28  * roymilohquit (Remote host closed the connection)
21:15:53  * bmacjoined
21:45:31  * kazuponjoined
21:50:20  * kazuponquit (Ping timeout: 250 seconds)
21:58:53  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:05:38  <jongleberry>you don't ened middlewaer
22:05:44  <jongleberry>just create your own function
22:05:57  <jongleberry>"Right now I'm doing it after the router inside each request handler" sounds good to me
22:06:38  <jongleberry>`var body = yield parse(this); if (!validate.password(body.password)) this.throw(400, 'bad password');`
22:06:46  <jongleberry>you don't need any crazy validation systems :)
22:14:13  <TheAceOfHearts>I do validation like this: {errors: {modelName: { name: errorMsg, foo: errMsg2, …}}}
22:14:59  <TheAceOfHearts>and then I can use some libs I've made that automatically propagate the error messages into the form \o/
22:46:31  * kazuponjoined
22:51:35  * kazuponquit (Ping timeout: 255 seconds)
23:07:52  * feelfinequit (Remote host closed the connection)
23:14:24  * feelfinejoined
23:16:18  * bmacjoined
23:24:40  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:47:31  * kazuponjoined
23:52:03  * kazuponquit (Ping timeout: 240 seconds)