New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get() stalls when called from HTTP::Easy #107
Conversation
I fear this patch takes the wrong approach. Setting the encoding of the socket is necessary to make sure that multi-byte sequences aren't torn apart. For example in UTF-16LE and BE there can be two-byte sequences starting with 0A, but with your patch the 0A would be wrongly recognized as a newline, and terminate the string returned from .get. Subsequent decoding as UTF-16{LE,BE} would fail. Parrot's readline method supposedly already has code that handles this problem. Have you found out why the current approach does not work? If it's due to a bug in Parrot, we should report it. (I might consider applying this patch as a last resort anyway, but I'd rather have a proper fix, if at all possible). |
I agree, I thought you might say something like that. I am not sure if it's parrot fault or how to recreate there. |
I did further logging - it definitely stops on this line: my str $line = $PIO.readline(nqp::unbox_s($!input-line-separator)); Host: localhost:3000 Then it tries to readline again - and this is where it stops. |
Can you please try the current rakudo code (ie without your patch) with parrot/master? There have been a few fixes to sockets. You can build a rakudo on top of parrot master with
in rakudo's source dir. |
I get stuck on bootstraping panda perl6 bootstrap.pl |
drKreso: this got fixed right now, please try again with rakudo HEAD. |
On Wed, Mar 6, 2013 at 3:03 AM, Kresimir Bojcic
I can confirm this has been fixed in the very latest Rakudo. Solomon Foster: colomon@gmail.com |
Ok, panda thing is working. |
I'm going to tag this ticket as Parrot specific, because it seems to be related to the readline bugs noted above. And there's not enough information to otherwise reproduce the bug here. Let me know if this affects other VMs. |
Since parrot is no longer is a supported VM, I'm closing this pull request. |
I am not sure if this makes any sense at all. I did run the full spec test suite. It did not break any more than usual. IO tests all passed.
This makes HTTP::Easy work as advertised (and consequently Bailador).