Skip to content
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

IO::Socket::INET doesn't set nl-in #1721

Closed
zoffixznet opened this issue Apr 9, 2018 · 0 comments
Closed

IO::Socket::INET doesn't set nl-in #1721

zoffixznet opened this issue Apr 9, 2018 · 0 comments
Assignees
Labels
BLOCKER Preventing the next release of rakudo, or just needing attention before the release regression Issue did not exist previously

Comments

@zoffixznet
Copy link
Contributor

$ ./perl6 -e 'my $h = IO::Socket::INET.new(:host("tclers.tk"), :port(80)); $h.print: "GET /conferences/tcl/2018-03-25.tcl HTTP/1.0\r\n\r\n";  for $h.lines { .say; say $++ }'

23:02 |   | s: IO::Socket::INET.new(:host("tclers.tk"), :port(80)), 'lines', \()
-- | -- | --
23:02 | SourceBaby | Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/518f2c319/src/core/IO/Socket.pm6#L87
23:03 | Zoffix | bisect: my $h = IO::Socket::INET.new(:host("tclers.tk"), :port(80)); $h.print: "GET /conferences/tcl/2018-03-25.tcl HTTP/1.0\r\n\r\n";  $h.lines.head(1000) == 1000 and die
23:03 | bisectable6 | Zoffix, Bisecting by exit code (old=2015.12 new=518f2c3). Old exit code: 0
23:04 |   | Zoffix, bisect log: https://gist.github.com/122ae2504d781d0c02ebf5a4538e6bfa
23:04 |   | Zoffix, (2017-05-26) https://github.com/rakudo/rakudo/commit/a6ece959d38d191a11f5a9928ff56eb4ef5ea3c8

@zoffixznet zoffixznet added regression Issue did not exist previously BLOCKER Preventing the next release of rakudo, or just needing attention before the release labels Apr 9, 2018
@zoffixznet zoffixznet self-assigned this Apr 9, 2018
zoffixznet added a commit that referenced this issue Apr 9, 2018
Fixes R#1721 #1721

When we read zero bytes we ask the decoder for all it's got, which gives
us an empty string and we infiniloop "reading" all the empty strings.

Fix by checking if the decoder is empty before grabbing the last bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKER Preventing the next release of rakudo, or just needing attention before the release regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant