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

Strange HTTPS behavior #30

Closed
Termina1 opened this issue May 19, 2015 · 11 comments
Closed

Strange HTTPS behavior #30

Termina1 opened this issue May 19, 2015 · 11 comments

Comments

@Termina1
Copy link

I'm writing simple parser. When trying to get contents of https://meduza.io/feature/2015/05/19/zaschita-astahova, I see some rubbish going through stream.

However, https://youtube.com or https://www.coursera.org/ works as normal.

What can this be?

@WyriHaximus
Copy link
Member

Can you be more precise about the rubbish? Is there no result or partial result? Also what versions does composer show -i give for react/* and which PHP version do you use?

@Termina1
Copy link
Author

It is seems to be some binary encoded data, represented as a string. Something like this:

��?W��WW~�Q��s}z��-l��Ji���<?�oP�}Em{��Tj�^�^kU�������>AY�S��qY��rX]'�w=|Z�W����{ϳ�{W_�uq�Ɨ�ڞ�_M�Q}����\�U��Zs�꒙���W����]�8�| ����S��o�t�  �|��UZ�4�}6x�cr*n�J�����8��kl��.q��l�ʏJ

PHP version: 5.6.7
Versions installed:

react/cache         v0.4.0  Async caching.
react/child-process v0.4.0  Library for executing child processes.
react/dns           v0.4.1  Async DNS resolver.
react/event-loop    v0.4.1  Event loop abstraction layer that libraries...
react/http          v0.4.0  Library for building an evented http server.
react/http-client   v0.4.2  Asynchronous HTTP client library.
react/partial       v2.0.2  Partial function application.
react/promise       v2.2.0  A lightweight implementation of CommonJS Pr...
react/react         v0.4.2  Nuclear Reactor written in PHP.
react/socket        v0.4.2  Library for building an evented socket server.
react/socket-client v0.4.3  Async connector to open TCP/IP and SSL/TLS ...
react/stream        v0.4.2  Basic readable and writable stream interfac...

@hiend
Copy link

hiend commented May 20, 2015

can you show your code please? don't have to keep guessing

@Termina1
Copy link
Author

@hiend it's basically the same as example from readme.

@WyriHaximus
Copy link
Member

Confirmed the issue on PHP 5.6.8

react/cache                          v0.4.0 Async caching.
react/dns                            v0.4.1 Async DNS resolver.
react/event-loop                     v0.4.1 Event loop abstraction layer that libraries can use for evented I/O.
react/http-client                    v0.4.1 Asynchronous HTTP client library.
react/promise                        v2.2.0 A lightweight implementation of CommonJS Promises/A for PHP
react/socket                         v0.4.2 Library for building an evented socket server.
react/socket-client                  v0.4.3 Async connector to open TCP/IP and SSL/TLS based connections.
react/stream                         v0.4.2 Basic readable and writable stream interfaces that support piping.

Running SSLlabs tests on it now to see if anything comes up there.

@cboden
Copy link
Member

cboden commented May 20, 2015

I should probably tag reactphp-legacy/socket-client#34

@WyriHaximus
Copy link
Member

@cboden already cloned socket-client into my vendor/react dir and the issue persists

@WyriHaximus
Copy link
Member

It isn't SSL you're seeing it's GZIP. You can confirm by making a test script outputting the response body and piping that into gunzip like: php test.php | gunzip -c.

Currently react/http-client doesn't support gzip. However I'm going through all the HTTP 1.0, 1.1, and 2.0 RFC's before drafting up a plan to support all them with all their features. This includes content encoding like GZIP.

@clue
Copy link
Member

clue commented Sep 3, 2015

Thanks for analyzing this @WyriHaximus! If this only boils down to #37, I suppose we can close this ticket?

@WyriHaximus
Copy link
Member

AGreed @clue, lets pick this up in #37 and work there on a solution.

@WyriHaximus
Copy link
Member

FYI #50 is fixing this issue

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

No branches or pull requests

5 participants