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

Server stalled #7

Closed
drKreso opened this issue Feb 28, 2013 · 4 comments
Closed

Server stalled #7

drKreso opened this issue Feb 28, 2013 · 4 comments

Comments

@drKreso
Copy link

drKreso commented Feb 28, 2013

I am using example form readme in http.pl. It stalls. I am using rakudo 2013.02.01. I think the same problem is manifested in Bailador.

perl6 http.pl
[2013-02-28T16:44:41Z] Started HTTP server.
[2013-02-28T16:44:42Z] Client connection received.
[2013-02-28T16:44:42Z] GET / HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Inte. l Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.99 Safari/537.22
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: remember_user_token=BAhbB1sGaQZJIiIkMmEkMTAkOEFlRHpVbkhlRGMuSEo5TU9nOVNaLgY6BkVU--115f241404a6c3d4bbfdd1a4fed7a1873ea54ae2; remember_korisnik_token=BAhbB1sGaQZJIhlSelY5ODFhenJoOXN5eE5QeGl6WQY6BkVG--b7c4594a3f8eb77d1579789982a20c28fc48e168

@supernovus
Copy link
Collaborator

A bunch of my socket libraries likely need some fairly large modifications since the Parrot IO changes. I'll do some testing shortly to see what is going on, but it's likely using an older API call.

This library is actually one that I've targeted for some larger changes, which will make it more flexible and robust.

@drKreso
Copy link
Author

drKreso commented Feb 28, 2013

Hi, I poked around a bit.

while $in-headers
{
my $line = $!connection.get.chomp;

This blocks after reading cookie from header.... Someone mentioned on the IRC it's rakudo issue.

@drKreso
Copy link
Author

drKreso commented Mar 1, 2013

Ok. I've reverted this commit: rakudo/rakudo@0b5899a#src/core/IO/Socket/INET.pm

And then I used in Easy.pm6 at line :93

  $key = $key.encode("binary").decode.uc;

instead of

$key .=uc;

Working like a glow :)

I am unsure of what the real fix would be.

@supernovus
Copy link
Collaborator

This is still waiting on a fix of the IO::Socket::INET.get() method which seems to wait indefintely after encountering a blank line. I'm not sure if this bug is in the library itself, or if it is a Parrot bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants