Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-lwp-gsoc, 2014-08-23

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:24 FROGGS_ joined #perl6-lwp-gsoc
13:47 dalek openssl: 3980f5c | sergot++ | lib/OpenSSL.pm6:
13:47 dalek openssl: add printing errors
13:47 dalek openssl: review: https://github.com/sergot/openssl/commit/3980f5ce5a
14:17 sergot FROGGS: we have a problem :(
14:17 sergot I'm trying to figure out something, but I'm failing
14:17 sergot It is about chunked transfer encoding with ssl
14:22 sergot looks like it returns only the chunk-size, but the $content is empty
14:35 sergot I'd be clueless soon
14:35 sergot :)
14:49 FROGGS hmmmm
14:50 FROGGS is there a test case?
14:52 sergot yes
14:52 sergot test #2 in t/09-ua-ssl.t
14:52 sergot There are two probelms
14:52 sergot Frist one, more common is: we receive only the header.
14:52 sergot I know the reson.
14:52 sergot reason
14:53 sergot Our module, recv exactly the whole header, so to $content is empty, we should recv something there - it seems like it can occur even when we don't use SSL.
14:54 sergot This $content is empty:
14:54 FROGGS but then we already know the content-length, no?
14:54 sergot https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L106
14:54 sergot yes, but it goes into if Transfer-encoding eq chunked.
14:55 sergot it goes into this: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L110
14:55 sergot so this: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L146 is ignored
14:55 sergot So, I know how to fix it.
14:55 FROGGS ahh, and then we miss the first line of the chunk :/
14:55 sergot I think I know
14:55 sergot yes
14:56 sergot What do you suggest?
14:57 sergot FROGGS: why do we add 2 here? https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L146
14:57 FROGGS $chunk ~= $conn.recv(6, :bin) unless $chunk; before line 129
14:57 sergot We have already added 2 in line 99
14:58 FROGGS hmmm
14:58 FROGGS then we have to do the .recv earlier
15:00 FROGGS before we add 2 probably
15:02 sergot my theory is following:
15:02 FROGGS so I think we should .recv 6 when +@a <= $msg-body-pos + 2
15:02 FROGGS but only for chunked
15:02 FROGGS but before line 106
15:03 sergot yes, this is what I wanted to write now :P
15:03 sergot In this case +@a == $msg-body-pos + 2.
15:04 FROGGS right
15:05 FROGGS so it is more like: $content = +@a == $msg-body-pos + 2 ?? $conn.recv(6, :bin) !! buf8.new( @a[...
15:06 FROGGS err, my $content = ...
15:06 FROGGS at line 106
15:06 FROGGS but... I would still do +@a <= ... just to be sure
15:12 sergot ok :)
15:20 FROGGS joined #perl6-lwp-gsoc
15:29 sergot now there is another bug
15:29 sergot but I have to go.. I
15:29 sergot I'll be later
15:29 sergot Could you try running it with above change?
15:30 sergot bbaib
15:30 sergot bbiab
18:38 sergot im back
18:39 sergot FROGGS: Why do we add two twice actually?
18:42 FROGGS once so that the last header line ends with \r\n
18:42 FROGGS and a second time, to be at the beginning of the content
18:55 sergot ok :)
18:55 sergot thanks
18:55 dalek http-useragent: 4f0d376 | sergot++ | lib/HTTP/UserAgent.pm6:
18:55 dalek http-useragent: fixed 2 bugs
18:55 dalek http-useragent:
18:55 dalek http-useragent: 1: it occured when it stop receiving just after the header and head separator was set to the end of received message
18:55 dalek http-useragent: 2: when (in chunked transfer encoding) it got the size of next chunk, and it was so long that it could not receive the content
18:55 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/4f0d376fd4
18:56 FROGGS that looks good
18:56 FROGGS (cannot test it atm)
19:07 sergot It seems like I can submit my code today :)
19:09 FROGGS awesome :o)
19:10 sergot I'm wondering if it must work - because I some .c written and they wont work if I just put every module in one dir.
19:10 sergot I have some*
19:10 sergot .c files*
19:10 sergot nvm, I will put it in diffrent dirs
19:12 FROGGS I don't even understand the question :o)
19:23 sergot ok, it is not important :))
19:29 sergot I've just sumbitted the code
19:30 sergot Ive read this: "Please only provide a sample of the work you had done by 18 August, 2014."
19:30 sergot so... I shouldn't add what I fixed today
19:32 sergot does this actually mater?
19:35 FROGGS well, it does not matter anymore when you already submitted, right?
19:38 sergot I can delete the file and upload again
19:39 FROGGS I'd do that
19:39 sergot ok
19:47 sergot Done. :)_
19:48 FROGGS sergot++
19:48 sergot Is it ok that my project was public during wokriing on it?
19:49 sergot (im sorry for typos, really bad conenection here, I cant see what Im writing)
19:49 FROGGS why shouldn't it be public?
19:50 sergot Don't know, just wanted to be sure.
19:50 sergot to be sure I did everything right.
19:50 FROGGS I mean, that is what most open source communities do
19:50 FROGGS you did, no doubt :o)
19:51 sergot thanks :)

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary