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
https seems broken #38
Comments
What OpenSSL's version do you have? It works on my box:
btw. timeout is NYI for now |
Its using libssl.so.0.9.8e from openssl-devel-0.9.8e-27.el5_10.4.i386. From an strace it seems its stuck in an inf loop over read: [pid 29911] read(14, "", 5) = 0 |
it appears https forwarding is broken, likely since the URI commit. For example (github forwards to ssl as does the google example above):
I say 'likely' because I had code that worked with https forwarding a few days ago (.get on http://www.github.com to be precise). However if you .get a url that does not forward to https it works fine:
|
This seems more like an issue with IO::Socket::SSL. I traced it down to the $!ssl.close call |
As you can see IO::Socket::SSL has no problem if it is given the correct port. HTTP::UserAgent gets the redirect via the headers 'location' field but fails to change the port. http-useragent/lib/HTTP/UserAgent.pm6 Lines 196 to 197 in 23106d1
and here we see that while it matches the https and enters the correct block, it uses the default port if it is set: http-useragent/lib/HTTP/UserAgent.pm6 Line 95 in 23106d1
|
Those don't work for me for different reasons: [jdv@jdv ~]$ perl6 -MIO::Socket::SSL -e 'my $c = IO::Socket::SSL.new(:host("github.com"), :port(443)); $c.send("GET /ugexe/zef/blob/master/META6.json HTTP/1.0\nHost: github.com\n\n"); say $c.recv' I have recent versions of stuff I think: [jdv@jdv ~]$ rpm -qa openssl |
nickl@localhost:~/perl6/zef$ openssl version nickl@localhost:~/perl6/zef$ perl6 -v |
Is it ok now? |
I can't test that because now Digest seems broken. The Digest tests hang and if |
Now that Digest is fixed I can test and sadly report a different failure. One char [jdv@wieldy ~]$ perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new(timeout => 5).get("http://google.com").content.chars' [jdv@wieldy ~]$ |
@jdv this actually looks like something in IO::Socket::SSL, struggling to see where though. |
Actually this might be a false hypothesis, I'm thinking that it might be to do with the redirects. If there is a relative redirect at certain points then the Host header doesn't get populated and boom. |
fwiw I added a |
Hi, It's not very tidy but it seems to work now. |
I think this is all good now, if someone else could check and close. |
Confirmed fixed. |
Note that this:
$ perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new(timeout => 5).get("http://google.com").content.chars'
53781
works yet this:
$ perl6 -MHTTP::UserAgent -e 'HTTP::UserAgent.new(timeout=>5).get("https://google.com").content.chars.say'
just hung and had to be killed.
The text was updated successfully, but these errors were encountered: