The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2016-06-14

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 asarch joined #mojo
00:36 bpmedley sri: After thinking about it, I'm not sure I can add much besides copying 'n pasting anything in regards to a distributed / clustered system.  However, if there's interest I can peruse some frameworks release notes and copy 'n paste.. :-O
01:40 tchaves1 joined #mojo
01:46 zivester joined #mojo
02:25 tchaves joined #mojo
02:29 noganex_ joined #mojo
02:37 tchaves joined #mojo
02:44 HtbaaPi_ joined #mojo
04:06 zivester joined #mojo
04:50 inokenty-w joined #mojo
05:42 dod joined #mojo
05:48 dod joined #mojo
06:15 tempire joined #mojo
06:49 osfabibisi joined #mojo
06:53 Vandal joined #mojo
06:55 trone joined #mojo
07:01 trone joined #mojo
07:12 AndrewIsh joined #mojo
07:24 dod joined #mojo
07:53 ashimema I'm getting some interesting results when running hypnotoad behind an apache reverse proxy...  anyone notice anything obviously wrong in my vhost.. can point out any best practices with this setup I may have missed? https://ssl.thorsen.pm/paste/56c00138f2e9
07:53 ashimema The symptoms I'm getting are random characters leaking into the pages in the browser.. sort of looks like headers are getting mingled into body content
07:54 ashimema and encoding issues
08:25 icjs joined #mojo
08:33 che-quest joined #mojo
08:40 Lee ashimema: are you using non-blocking code?
08:42 trone joined #mojo
08:50 kes joined #mojo
08:55 ashimema there's a mix.. so yes in places there's non-blocking code
08:55 ashimema what are you thinking Lee?
08:59 nic ashimema: At what point in the chain is the corruption created?
09:01 ashimema I'm actually not sure of that.. I'm blaming apache as I didn't see the issue before adding in the apache proxy layer.. before I was in development using morbo/hypnotoad binding on port 3000 and just hitting the server directly
09:01 ashimema any pointers in even working out where in the chain it's going wrong would be appreciated
09:04 nic I'm guessing you could set up a dev nginx equivalent in less than 15m
09:04 Lee ashimema: the apache config looks ok to me (at a glance)
09:05 Lee we had a similar issue recently but it turned out to be due to calling ->render_later twice (had a bunch of ifs that should have been elsifs) and when we upgraded we started seeing headers within body content
09:05 ashimema fair point nic.. I'll take a look at nginx.. just to rule in/out apache
09:05 Lee https://github.com/kraih/mojo/commit/455e66ef711db27d50528efe2e5a4f526490517d # this was the fix in mojo that showed the problem for us
09:05 ashimema though shibboleth isn't so well supported on nginx.. so i'd prefer to run with apache
09:06 ashimema ooh.. very interesting Lee.. thanks for that
09:06 ashimema I'll have a quick look through my code for any such cases
09:06 Lee we do use the same setup - ELB -> apache -> mojo
09:08 ashimema hmm.. no obvious cases of double `->render_later`'s
09:09 ashimema kinda nice to at least know someone else has had similar problems some time
09:11 Lee yes, i spent a couple of days bisecting it and then eventually the problem was staring right at me :D
09:11 ashimema man I hate heisenbugs.. when you can't consistently replicate a bug it's a nightmare to track down if you've actually fixed it
09:13 ashimema tis is the sort of thing it shows up as in the browser btw: https://cloud.githubusercontent.com/assets/17139950/12913878/2563200a-cf19-11e5-8e70-e2844901f657.PNG
09:13 Lee https://gist.github.com/leejo/3d5ae177d79aab718c5222c6bea92d92 # this is the commit message from my fix, which may also help a little
09:13 ashimema in case it's remotely usefull
09:13 ashimema right now.. i'm going to give nic's suggestion a try and throw nginx into the mix in place of apache
09:13 Lee yeah, that doesn't quite look the same as the problem we had
09:17 * ashimema goes off to test some more
09:17 ashimema thanks for your hints and tips chaps
09:46 stigo joined #mojo
09:51 stigo joined #mojo
10:06 meshl joined #mojo
10:12 ashimema_ joined #mojo
10:22 ladnaV joined #mojo
10:49 sri wishlist thread getting more active https://groups.google.com/d/msg/mojolicious/JLZlJwkm0Ho/uzh9SorsAAAJ
10:49 trone joined #mojo
10:50 ashimema joined #mojo
10:52 trone joined #mojo
10:57 dvinciguerra joined #mojo
10:58 tchaves joined #mojo
11:06 tchaves joined #mojo
11:19 Kripton joined #mojo
11:41 stigo joined #mojo
11:45 Vandal joined #mojo
12:20 punter joined #mojo
12:40 sri oh, the jquery 3 upgrade broke our built-in templates
12:40 kaare joined #mojo
12:44 sri well, that was easy
12:49 HtbaaPi_ does anyone know what settings to use with Plugin::OAuth2 to enable signon through Twitter?
12:53 punter joined #mojo
12:54 Lee i though twitter use(d) oauth 1.0?
12:55 good_news_everyon joined #mojo
12:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/volrv
12:55 good_news_everyon mojo/master f60dafc Sebastian Riedel: jQuery does not like shortcuts anymore
12:55 good_news_everyon left #mojo
12:55 HtbaaPi it seems they also support (some?) of OAuth2 https://dev.twitter.com/oauth/reference/post/oauth2/token
12:55 HtbaaPi I'm not too familiar with it though. managed to setup Facebook and GitHub signon just fine
12:56 Lee then you just need to set the auth code and access token routes + your client id + secret
12:56 Lee https://metacpan.org/pod/Mojolicious::Plugin::OAuth2#Configuration
12:57 HtbaaPi I did that but so far I'm not getting anywhere. Maybe I got the ID wrong
12:58 HtbaaPi if I set my ID I get some sort of 'there's no request token for this page'
13:03 Lee that doesn't look like they use the authorization code grant
13:04 HtbaaPi according to the docs of twitter it only supports client_credentials grant_type, not authentication
13:04 gizmomathboy joined #mojo
13:04 HtbaaPi *authorization_code grant_type
13:05 Lee then (i believe) the OAuth2::Plugin isn't going to work for it
13:05 HtbaaPi so perhaps it's not possible to signon using Twitter and Plugin::OAuth2
13:05 * Lee reminds himself of the source
13:05 Lee yes, the plugin only currently supports grant_type of authorization_code
13:06 ramortegui joined #mojo
13:06 * ashimema is reminded that he wants to write ::Plugin::Shibboleth
13:07 Lee HtbaaPi: it should be reasonably trivial to add that particular grant type to the plugin
13:13 HtbaaPi Lee: if changing the grant_type is all there is to it than it's worth a shot. I don't know a thing about OAuth myself though
13:15 Lee i don't think it will be *that* trivial :D
13:16 good_news_everyon joined #mojo
13:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/volKS
13:16 good_news_everyon mojo/master a6b8a28 Sebastian Riedel: slightly smoother menu bar
13:16 good_news_everyon left #mojo
13:17 Lee HtbaaPi: compare https://tools.ietf.org/html/rfc6749#section-4.4.1 and https://tools.ietf.org/html/rfc6749#section-4.1.3 and go from there
13:18 HtbaaPi thanks
13:18 genio joined #mojo
13:28 user_4378 joined #mojo
13:30 jberger ashimema: that's not just headers that's content before the start line
13:31 jberger I'd be curious to see the actually response sent, not just the output from the browser
13:31 jberger s/ly//
13:33 good_news_everyon joined #mojo
13:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/volPR
13:33 good_news_everyon mojo/master fb58d90 Sebastian Riedel: update the last known position more often
13:33 good_news_everyon left #mojo
13:35 user_4378 $self->req->url->to_abs->userinfo. Is there a way to obtain the username and password in two seperate strings? Or am I supposed to use split?
13:35 user_4378 split /:/
13:36 jberger user_4378: i believe that's true (using split l
13:36 jberger )
13:38 user_4378 Alright, any anything under sub { } is absolutely safe, when under returns undef, right?
13:38 user_4378 any * and
13:38 user_4378 under this statement
13:39 user_4378 and anything above ("under sub { .. }") is not protected
13:39 user_4378 in a lite app
13:39 bpmedley user_4378: I've had no issues with using under/group for protecting content.
13:44 user_4378 just asking. since I need to receive post requests from third-party sites. some cannot do basic authentication. I guess I'll run this on a different port in a new mojo-app instead of placing the functions above under sub { ..  }
13:51 ashimema jberger: yeah.. unfortunately it's one of those hiesenbugs that's a bugger to reproduce on demand
13:52 ashimema next time I manage to get it, I'll try to extract the response.. it's all api routes.. so should just be json bodies (going via the ::Swagger2 plugin)
13:54 Kripton Few days ago, I asked about  replacing apache/nginx to Varnish + mojo ( mojo serving static content, cached by varnish)
13:54 Kripton I would like to say that was a excelent idea , the system is a lot, more fast and responsive now
13:56 Kripton 2 varnish, 4 mojo servers, 2 db , 30K simultaneos connections
13:58 good_news_everyon joined #mojo
13:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/volDB
13:58 good_news_everyon mojo/master 9a7c5be Sebastian Riedel: add password and username methods to Mojo::URL
13:58 good_news_everyon left #mojo
13:58 sri user_4378: no need for split anymore now
14:01 dvinciguerra_ joined #mojo
14:03 user_4378 nice
14:09 sri hmm, this differential privacy stuff apple does is interesting
14:09 sri so siri can learn from interactions with you, but never create a profile that can be tracked back to you
14:19 Grinnz HtbaaPi, twitter uses oauth2 for authorization on behalf of the applicatio itself, and oauth1 for authorization on behalf of a user
14:19 Grinnz see https://metacpan.org/pod/Mojo::WebService::Twitter
14:20 Grinnz not sure about the "sign on with twitter" part, never used that
14:23 lluad joined #mojo
14:28 HtbaaPi Grinnz: thanks for the info
14:30 ptolemarch joined #mojo
14:34 mcsnolte joined #mojo
14:46 zivester joined #mojo
14:52 icjs hello guys, why does uploading a large file to my mojo app result in no response? it should trigger a $self->render_swagger call but for some reason doesnot take it
14:53 jberger mojo has protections against large files
14:54 icjs it's like it just returns without sending anything
14:54 jberger http://mojolicious.org/perldoc/Mojo/Message#max_message_size
14:56 icjs jberger, thanks - i'll take a read
15:12 icjs i think i have exceeded the Mojo::Message::max_message_size
15:13 icjs question, i upload my file using Mojo::Upload, how to do access the Mojo::Message::max_message_size method from there?
15:14 icjs i just want to test/prove this file size limit has been exceeded, i know i can do it via setting the MOJO_MAX_MESSAGE_SIZE environment variable too
15:16 jberger $c->req is the request message
15:16 jberger http://mojolicious.org/perldoc/Mojo/Message#is_limit_exceeded
15:16 jberger you can check $c->req->is_limit_exceeded
15:26 icjs jberger, thank
15:31 sri argh
15:31 sri so, this https://github.com/kraih/mojo/issues/971
15:31 sri turned into this https://groups.google.com/d/msg/mojolicious/eK-LEOMwTMY/adtdpN77AAAJ
15:31 sri -.-
15:33 sri although, i'm less sympathetic of people that ignore the issue template, even if there's a language barrier
15:39 jberger :s
15:41 jberger is Mojo::UserAgent::ca not what he needs?
15:41 jberger I don't understand what he is asking for
15:41 cfedde What's the difference between Mojo::URL::authority and Mojo::URL::userinfo?
15:41 sri host
15:42 sri and port
15:42 cfedde I see that now.  thanks
15:44 cfedde an "authority" is the container for those three bits. yay rfc
15:53 jberger sri: have you had problems with search_path and pubsub?
15:53 sri jberger: no
15:53 jberger hmmm
15:53 jberger ok I'll dig through test files to see how you are doing it
15:54 jberger I guess I'm actually asking about search_path and triggers and pubsub
15:54 jberger which is probably actually the problem
15:55 * sri didn't realize how much the spreadshirt changes would actually hurt his sponsored time
15:56 sri down to only 2-3 hours per month now
16:00 PopeFelix joined #mojo
16:04 sri think i'll try transitioning to more of a moderator role, cleaning up pull requests, instead of working on changes myself
16:04 sri to make more efficient use of the limited time i have
16:10 sri that means forwarding all bug reports to github, and tagging the issues
16:12 jberger if I use the psql client, set the search path and then create a function, it exists in the specified schema
16:13 jberger but when I do the same thing via Mojo::Pg::Migrations it seems to put the function in public
16:13 jberger I'm still investigating, but if it sounds familiar to anyone then I'm all ears
16:14 good_news_everyon joined #mojo
16:14 good_news_everyon [mojo] kraih tagged v6.65 at 71087fb: https://git.io/vo8t7
16:14 good_news_everyon left #mojo
16:15 bpmedley sri: you've done amazing work with your code
16:15 good_news_everyon joined #mojo
16:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vo8qU
16:15 good_news_everyon mojo/master 026346d Sebastian Riedel: bump version
16:15 good_news_everyon left #mojo
16:16 dod joined #mojo
16:19 sri bpmedley: thanks, but a pep talk is not what i need right now ;p
16:20 sri having to leave #970 open really bugs me
16:20 sri but that's really my problem, have to get used to a more hands off role... which is not really my nature
16:24 PopeFelix joined #mojo
16:41 McA joined #mojo
16:59 Trelane Does anyone have any input on my CSRF protection plugin before I shove it the way of the CPAN?
16:59 Trelane https://github.com/maxmind/Mojolicious-Plugin-CRSFProtect
17:04 bpmedley Trelane: should the 403 be configurable?
17:05 odc joined #mojo
17:06 Trelane bpmedley: It seems like the right thing to do
17:06 Trelane They can override the reply.bad_csrf helper if they want more control over the response
17:08 sri seems reasonable
17:09 sri bare "return;" makes me cringe though ;p
17:09 Trelane sri: oh, what should it do?
17:09 sri return undef; or return 0;
17:10 Trelane Ha, I'll get dinged as going againts internal house style guides for that
17:10 sri eeep
17:11 sri get those guides fixed!
17:11 sri even damian recommends "return undef;" over "return;" now
17:11 PryMar56 joined #mojo
17:12 PopeFelix joined #mojo
17:40 sri tagged with help wanted too https://github.com/kraih/mojo/issues/970
17:55 jberger sri: I'm getting pretty close to a minimal example, if I use the same Mojo::Pg object to create the schema and to migrate then the search_path is ignored and objects are created in public
18:07 jberger sri: https://gist.github.com/jberger/5d4cac7b03ce41d7eac0ee29559494a9
18:14 jberger oh! its cached connections
18:14 jberger ok so I recommend setting max_connections(0) before creating the schema
18:15 jberger then set it back to 5 or whatever when you actually set the search path
18:21 jberger sri: could setting search_path flush the connection cache? if not I'm going to work on a doc patch for the isolation example at Mojo::Pg::search_path
18:22 jberger pick whichever path you prefer but that was a hard one to debug, I'd like to prevent someone from having to go through it
18:46 sri jberger: no time
18:47 sri open an issue
18:47 jberger I can do whichever one if you just tell me which you prefer
18:47 sri have to look into it first
18:47 jberger ok
18:47 jberger I'll open an issue then
18:58 jberger sri: https://github.com/kraih/mojo-pg/issues/22
18:59 sri tagged, everyone is welcome to discuss
18:59 itaipu joined #mojo
19:03 zivester joined #mojo
19:11 sri no way i can make a quick decision, for now i'll just fix the error in the docs
19:14 jberger Sounds good
19:21 sri hmm, macos sierra has a new monospace font
19:27 cpan_mojo Mojo-Pg-2.28 by SRI https://metacpan.org/release/SRI/Mojo-Pg-2.28
19:33 zivester joined #mojo
19:36 haarg sri: new font or just switched?
19:38 sri new, apparently it's a version of the san francisco typeface
19:39 sri have not found any good examples yet though
19:40 sri looks very clean http://imgur.com/a/ZvRog
19:43 genio apparently I'm using Andale Mono.  My only requirement for fonts is that they be legible and monospaced.  I probably wouldn't even notice that you switched it on me as long as it was monospaced
19:43 * sri is a Consolas snob
19:44 genio I don't think I changed the default font in iTerm2, so...
19:46 genio I just switched it around a bit to see if it'd make me cringe.  consolas vs andale wasn't a big deal to me.  I could live.  it messed up the size of my window when switching, that's about all I noticed
19:46 sri yea, consolas is a little smaller, just increase the size by one
19:48 preaction i evaluated quite a few and picked DejaVu Sans Mono
19:49 sri not a bad choice, i like dajavu too
19:49 sri apple also defaults to a hacked vera font pre macos sierra
19:51 sri right, they call it Menlo, think it might even be a version of dejavu
19:52 sri Fira Mono from mozilla is also pretty good
19:54 sri must have cost them a fortune getting it designed by one of the masters
19:57 kaare joined #mojo
20:08 asarch joined #mojo
20:25 punter joined #mojo
20:26 blonewolfs joined #mojo
20:26 tim joined #mojo
20:27 blonewolfs where are mojolicious apps generally installed for a production environment?
20:30 tim Is there a chance that this proposal for socks version 4 support in Mojo::UserAgent will be accepted? https://gist.github.com/tim-2/27baa4055c725e3bce57eb0ad589e609
20:34 preaction blonewolfs : i've deployed mojo apps via cpan-style dists (so, in a local::lib with the app script used to launch) and via the development directory with rsync or the like. i've seen them deployed via rpms as well
20:35 coolo we deploy as rpms under /usr/share
21:00 marty joined #mojo
21:16 CW2 joined #mojo
21:19 sri tim: not without test and documentation updates
21:19 ptolemarch joined #mojo
21:23 sri and code cleanups
22:10 disputin joined #mojo
22:33 zivester joined #mojo
22:44 CW joined #mojo
23:07 Vitrifur joined #mojo
23:34 mtths joined #mojo
23:34 janus joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary