@mattab opened this Issue on September 5th 2017 Member

The following test started failing a few days ago:

1) Piwik\Tests\Integration\HttpTest::testSocketHttpsWorksWithValidCertificate

Exception: Too many redirects (6)

No idea where this issue comes from?

(we discussed it may be the Location: https://xxx header is present causing the redirects. But wondering why this was not the case before.)

@mneudert commented on September 5th 2017 Member

I tried to connect manually to the domain using openssl s_client -connect and found that it does not react to the HTTP payload. That is also the case with piwik.org hosted in the same place.

Every other host I tried reacted in a different but expected way.

The odd thing is that using a PHP socket like the unit test does fails reproducible with redirects but a connection with curl from the command line works just fine. When receiving data there is a header I have not seen anywhere else:

Via: 1.1 alproxy

Could it perhaps be a hoster issue?

openssl divezone.net ``` > openssl s_client -connect divezone.net:443 CONNECTED(00000003) ... SNIP CONNECTION INFORMATION ... --- GET / HTTP/1.0 ^C ``` openssl google.com ``` > openssl s_client -connect google.com:443 CONNECTED(00000003) ... SNIP CONNECTION INFORMATION ... --- GET / HTTP/1.0 HTTP/1.0 302 Found ```
@mneudert commented on September 5th 2017 Member

Additional fact:

openssl s_client -connect alwaysdata.com:443 (the hoster) works properly but does not send the alproxy-header. The domain blog.alwaysdata.com sends the header and does not communicate with openssl...


@sgiehl commented on September 10th 2017 Member

@mneudert thanks for investigating. I will for now change the host to google.com.
@mattab If you would like to change that back to divezone.net, feel free to do so, as soon as it returns "expected" headers.

@mattab commented on September 10th 2017 Member

We need to troubleshoot the socket connection over SSL issue at some point to check whether there is a bug in the code? the test should ideally use Piwik.org as we most often connect to Piwik.org to download content and if this breaks, it could break the auto updater or Marketplace features. Moving to 3.2.0

@mattab commented on September 18th 2017 Member
@mattab commented on September 21st 2017 Member

Fixed by @mneudert in #12074

This Issue was closed on September 21st 2017
Powered by GitHub Issue Mirror