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

IRC log for #mojo, 2017-03-17

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

All times shown according to UTC.

Time Nick Message
00:00 kgoess from inside a mojo $app, is there a way to find the $server that's running it? I want to get at the listen_ip and stuff...
00:55 veryrusty joined #mojo
00:55 aborazmeh joined #mojo
01:25 aborazmeh joined #mojo
01:52 itaipu joined #mojo
02:31 veryrusty joined #mojo
03:08 mcsnolte joined #mojo
03:20 Xyem The issue with the host has been fixed, but they are blaming Mojolicious for sending invalid headers..
03:21 Xyem "it appears there may be some weird behavior in Mojolicious causing it to send invalid headers (technically - the RFC isn't very clear about how to handle CRLF for line termination)"
03:21 Xyem As far as I can see, CRLF is the HTTP standard line terminators..
03:23 Grinnz yes
03:24 Grinnz https://tools.ietf.org/html/rfc7230#section-3
03:24 Grinnz it's very specific, every header ends in CRLF and there is an additional CRLF before the body
03:25 marty joined #mojo
03:27 Xyem I actually tee'd out the output from Mojolicious to see what it was sending to the server: http://pastebin.com/5SN932kg
03:28 Xyem So the above used to be mangled by the server.. I don't see Mojolicious doing anything wrong there.
03:29 Xyem Unless it not specifying it is HTTP/1.1 is the problem?
03:31 Grinnz MOJO_USERAGENT_DEBUG=1 will output any requests sent or responses received to stdout, fyi
03:31 Grinnz requests always need to start with the start line, yes https://tools.ietf.org/html/rfc7230#section-3.1
03:32 veryrusty joined #mojo
03:34 Xyem So the headers coming from Mojolicious in this case are incorrect, as it is missing the start-line?
03:35 Grinnz do you not see the start line using MOJO_USERAGENT_DEBUG?
03:35 Grinnz i find that highly unlikely
03:36 noganex_ joined #mojo
03:36 Grinnz or rather MOJO_DAEMON_DEBUG if this is a response
03:37 Xyem It's a response and Mojolicious is being launched by CGI, so STDOUT goes to the browser (and this is what I tee'd
03:37 Xyem )
03:37 Xyem Rather, STDOUT goes back to the CGI server, to be sent to the browser.
03:38 Grinnz i don't remember if you're doing anything weird, but it would be pretty difficult to get mojo to render without the start line
03:39 Xyem Everything works correctly when either Mojolicious is serving itself (e.g. Morbo) or when the CGI server is Apache. The break only happens when the CGI server is LiteSpeed.
03:40 Xyem It appears Mojolicious omits status-line under CGI
03:40 Xyem Using 'get' emits it, using 'cgi' does not.
03:40 Xyem (Mojolicious commands, sorry)
03:40 Grinnz right, CGI is not HTTP
03:41 Grinnz so then it's this other server that's not sending a proper HTTP response?
03:41 Xyem It does, but it changes the 'Location' header to an invalid one when Mojolicious sends something like
03:42 Xyem Location: /\r\nStatus: 302 Found\r\n\r\n
03:42 Xyem They are claiming this is because it is invalid on Mojolicious' part.
03:43 Xyem Because of it using CRLF terminators.
03:43 Grinnz i don't really know enough about CGI to know if that's true, but https://metacpan.org/source/SRI/Mojolicious-7.29/lib/Mojo/Server/CGI.pm#L34 is where it converts the status into a header for CGI
03:46 Xyem Having a quick look doesn't say a CGI "client" has to do anything different with regards to line termination.
03:47 Grinnz https://tools.ietf.org/html/rfc3875#section-6.3 seems to indicate that the ends should just be NL characters, but i cant find something that says that for certain
03:48 Grinnz in https://tools.ietf.org/html/rfc3875#section-2.2 it says "Note that newline (NL) need not be a single control character, but can be a sequence of control characters" which is nice and vague
03:48 Xyem I think I see what happened.
03:49 Xyem There is a provision for using NL and ignoring the leading CR.
03:49 Xyem I bet they did that, but without ignoring the CR :)
03:50 Grinnz well the spec also doesn't say NL needs to be specifically a linefeed
03:50 Grinnz so i assume it means it can be LF or CRLF
03:50 Xyem Oh, sorry, it does say LF, not NL.
03:50 Xyem "The line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR."
03:51 Xyem https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.3
03:51 Grinnz that is for HTTP, not CGI
03:51 Grinnz also, that rfc is obsoleted
03:51 Grinnz by the one i linked earlier
03:52 Xyem Oh I see, thanks.
03:52 Grinnz but 3875, which is for CGI, is what i mean doesn't specify linefeed or carriage return specifically
03:52 Grinnz just says newline
03:54 Xyem So it is safe to say Mojolicious has valid headers under CGI then?
03:55 Grinnz sounds like apache seems to think so, at least :P
03:55 Xyem Haha, yes :)
03:58 Xyem Grinnz: Thanks for looking over this with me. 4am calls me to retire to bed!
04:21 mmp_ joined #mojo
05:04 dboehmer_ joined #mojo
05:59 veryrusty joined #mojo
06:34 dod joined #mojo
06:39 dod joined #mojo
06:44 Vandal joined #mojo
07:00 mroy joined #mojo
07:04 mroy Fyi: Mojo::IOLoop::HoboProcess was running fine on the Windows platform up till Mojolicious 7.24. Am looking into why HoboProcess is failing with Mojolicious 7.25 onwards.
07:13 mroy Ah, sub DESTROY { Mojo::Util::_global_destruction() or shift->close } in Mojo::IOLoop::Stream. Okay. I cannot have MCE::Hobo spawn threads on the Windows platform. No problem.
07:14 janl joined #mojo
07:14 janl joined #mojo
07:19 mroy The fix is to have MCE::Hobo spawn children versus threads on the Windows platform. All tests in Mojo::IOLoop::HoboProcess are passing if I do that. :)
07:35 inokenty-w joined #mojo
08:09 AndrewIsh joined #mojo
08:09 trone joined #mojo
08:35 AndrewIsh joined #mojo
08:43 AndrewIsh joined #mojo
09:01 rshadow joined #mojo
09:20 nic mroy++  # pushing the boundaries
09:26 sri hmm, i guess it's not the greatest idea to make the remove and retry flags in the minion job command -r and -R
09:26 sri accidentally removing a job you want to retry is kinda bad
09:26 sri maybe remove shouldn't have a short version
09:26 sri just --remove
09:34 coolo sri: I had to be really careful yesterday when I had to remove the broken index jobs and restart the parents - indeed :)
09:35 sri i just had to check minion job -h for the third time this week...
09:36 dod joined #mojo
09:36 sri and at the same time i'm too lazy to write --retry and --remove
09:36 sri ¯\_(ツ)_/¯
09:43 veryrusty joined #mojo
09:59 Jonis -w 4
10:36 irqq joined #mojo
11:03 castaway joined #mojo
11:19 itaipu joined #mojo
11:26 tchaves joined #mojo
11:30 Ryoga joined #mojo
11:36 veryrusty joined #mojo
11:47 mroy thanks nic++
11:48 janl left #mojo
11:56 osfabibisi joined #mojo
11:57 itaipu_ joined #mojo
12:47 tchaves1 joined #mojo
12:49 tencendur joined #mojo
12:50 itaipu joined #mojo
12:51 Ryoga joined #mojo
12:53 tencendur joined #mojo
12:56 DavidSouza joined #mojo
13:00 AndChat-437241 joined #mojo
13:06 gizmomathboy joined #mojo
13:21 tchaves joined #mojo
13:24 marty joined #mojo
13:27 rshadow joined #mojo
13:38 marty joined #mojo
13:52 mcsnolte joined #mojo
13:52 itaipu joined #mojo
13:53 gryphon joined #mojo
14:00 Pyritic joined #mojo
14:13 aborazmeh joined #mojo
14:18 sri guess instead of watching iron fist i'll just finish horizon zero dawn this weekend
14:21 sri which is fantastic btw., much like a scifi version of the witcher 3
14:21 haarg i would like to play that game, but ps4 :(
14:22 sri also missing out on uncharted 4
14:26 rshadow joined #mojo
14:41 Ryoga joined #mojo
15:11 itaipu joined #mojo
15:28 DavidSouza joined #mojo
15:51 kes joined #mojo
15:51 kes is this OK that in Mojo::Parameters::every_param
15:52 kes the $self is undefined?
15:52 kes Here is the call:
15:52 kes sub every_param { shift->params->every_param(@_) }
15:53 kes err, it is stringified to empty string. Sorry
15:53 lluad joined #mojo
15:54 sri did not pass the vote https://github.com/kraih/mojo/pull/1070
15:54 sri if someone wants to try another version
15:55 Lee sri: i'm done contributing to this project, helping people here, advocating for mojo, and giving talks on it
15:58 jberger Lee I'm sorry to hear that
15:58 jberger you've been a valued help to us
16:00 Lee it's a great project, but sri's mercurial attitude, cognitive dissonance, terrible commit messages, and passive hostility to contributors (especially those who don't have good English) has really truned me of participating. sorry :(
16:02 Pyritic joined #mojo
16:05 sh14 joined #mojo
16:06 miller joined #mojo
16:06 jberger Lee: I guess I'm surprised that this was the straw that broke the camel's back
16:06 jberger the PR was closed with a fairly agreeable wording, this PR didn't meet the voting standard in our rules
16:07 jberger I see points on both sides in the discussions that were had, it seemed to be professional on all sides
16:08 jberger anyway, I'm sorry to see you go, but I won't beg either
16:13 PryMar56 joined #mojo
16:20 itaipu_ joined #mojo
16:21 gryphon joined #mojo
16:32 itaipu joined #mojo
16:49 itaipu_ joined #mojo
16:58 Ryoga joined #mojo
17:07 sri Lee: i never intended any hostility... in fact i tried going the extra mile by showing you ways to get the feature past a vote... putting all that blame on me now feels very unfair :(
17:08 kaare joined #mojo
17:12 odc isn't there a problem on this line? https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Morbo.pm#L19
17:12 odc -f $_ && -r _
17:13 odc what is this single underscore?
17:14 Grinnz odc: it's a special filetest operator thing
17:14 Grinnz see http://perldoc.perl.org/functions/-X.html
17:14 odc o.O
17:14 odc thanks
17:14 Grinnz "If any of the file tests (or either the stat or lstat operator) is given the special filehandle consisting of a solitary underline, ..."
17:17 sri Lee: and you're being hypocritical, i'm not a native english speaker myself... i actually had to ask how passive hostility works
17:18 Lee_ joined #mojo
17:19 odc Grinnz: i suppose it is equivalent to " -f -r $_" ?
17:20 Grinnz yes, but that form is less common
17:20 Lee_ sri: https://github.com/kraih/mojo/pull/1070/commits/dd2cd256000661a5476b7b94da4860bde1eace88 # i made exactly the changes you suggested at https://irclog.perlgeek.de/mojo/2017-03-14#i_14261809
17:20 sri anyway, i guess if people feel like i should be more hands off with pull/feature requests i don't personally care about... sure i can do that, and only vote on the finished ones
17:20 Lee_ still, rejected without acknowledging the changes
17:20 Lee_ which is incredibly frustrating
17:21 Lee_ note the commit message
17:21 marty I just read the comments on the PR and I see no indication at all that sri was being hostile.  In fact, sri ended the comments with a "thank you"!
17:23 Lee_ so *shrug*
17:23 sri Lee_: what do you want from me?
17:23 Lee_ if you suggest changes then acknowledge them when they are made
17:24 sri what do you mean with acknowledge?
17:24 Lee_ the last comment says "this pull request as it stands did not pass the vote", but the vote was made before the changes were made that you suggested
17:24 preaction as an outside observer: the change request seemed, to me, to be "if the vote passes, these changes need to be done for it to be part of mojolicious". the vote on the feature itself was still pending.
17:25 sri your changes did not affect my vote
17:25 Lee_ so what's the point in making suggestions?
17:26 Lee_ i spent a few hours testing this today to make sure there was a benefit (not that i don't believe my colleagues you understand)
17:26 sri i was thinking that a more neutral version could get more favorable votes from others
17:26 Lee_ right, so i made that change
17:27 Lee_ *after* it had been discussed here
17:27 Lee_ then, yes, there was some distraction with an issue in Minion (IIRC)
17:27 sri yea, and it did not change votes
17:27 Lee_ then *acknowledge* that the changes didn't affect the vote
17:28 Lee_ otherwise i don't know why i'm taking feedback
17:28 Lee_ because what difference does it make?
17:29 sri if you don't like the voting process suggest changes, but don't put all the blame on me
17:30 sri i wish you good luck with the next open source community you decide to join
17:32 odc the way i see it, it's either Lee's proposal or you add inotify support ^^
17:32 odc or you make it official morbo does not support huge apps
17:33 gabriel_ left #mojo
17:33 preaction i could make the Mojo::FSEvents module i want that picks the right OS-specific backend (since Statocles needs it), but it'd have to be an optional dependency since it requires a compiler and OS libs/headers
17:34 preaction but that's irrelevant to the reason the vote was rejected, as i understand it
17:34 sri kinda relevant, i don't want to expose the ugly implementation details because i'm hoping someone will find a better solution
17:35 sri pluggable backends or whatever
17:35 sri and that's what i said here too
17:35 sri Lee was being rather selective with his quotes
17:36 odc "a better solution" : how about making the sleeping time increase with the number of files watched?
17:45 ashimema joined #mojo
17:45 itaipu joined #mojo
17:50 itaipu_ joined #mojo
18:05 rshadow joined #mojo
18:28 sri really, i think plugable backends are the right solution
18:29 sri make a minimal sleep file check based one, and allow a morbo --backend FSEvents flag
18:30 sri have that load Mojo::Server::Morbo::Backend::FSEvents or so
18:51 sri too much drama for me, back to horizon zero dawn :)
18:52 sri got some robot dinosaurs to kill
19:38 gryphon joined #mojo
19:38 irqq joined #mojo
19:47 dod joined #mojo
19:57 dod joined #mojo
20:17 irqq_ joined #mojo
20:26 rshadow joined #mojo
20:46 jberger for completely other reasons I stumbled on this: https://tools.ietf.org/html/rfc3986#section-3.2.1
20:46 jberger interesting to see that they recommend not formatting the userinfo into a rendered url too
20:46 jberger so we've done the right thing I think
20:50 Ryoga joined #mojo
20:57 sri yea, but it's good we can generate the unsafe version too
21:03 jberger sure
21:03 marty_ joined #mojo
21:03 marty_ joined #mojo
21:03 Pyritic joined #mojo
21:04 marty__ joined #mojo
21:05 marty joined #mojo
21:10 arpadszasz joined #mojo
21:55 simcop2387 joined #mojo
22:09 batman I'm really happy about the unsafe method! Makes the default sensible, but allowing all the info when you know you need it.
22:10 batman sensible = like, don't accidentally put usernames in log messages or whatever.
22:12 sri btw. the Test::Mojo config override feature has been working out great for me
22:13 jberger I really need to take a day and use the config overrides at work
22:13 jberger I'm sure it would help me out too
22:35 * batman tries to avoid config...
23:24 marty joined #mojo

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