Skip to content

Strange HTTPS behavior #30

Closed
Closed

Description

@Termina1

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?

Activity

  1. WyriHaximus commented on May 19, 2015

    @WyriHaximus
    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?

  2. Termina1 commented on May 20, 2015

    @Termina1
    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...
    
  3. hiend commented on May 20, 2015

    @hiend

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

  4. Termina1 commented on May 20, 2015

    @Termina1
    Author

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

  5. WyriHaximus commented on May 20, 2015

    @WyriHaximus
    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.

  6. cboden commented on May 20, 2015

    @cboden
    Member

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

  7. WyriHaximus commented on May 20, 2015

    @WyriHaximus
    Member

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

  8. WyriHaximus commented on May 23, 2015

    @WyriHaximus
    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.

  9. clue commented on Sep 3, 2015

    @clue
    Member

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

  10. WyriHaximus commented on Sep 3, 2015

    @WyriHaximus
    Member

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

  11. WyriHaximus commented on Nov 17, 2015

    @WyriHaximus
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions