Skip to content

strtolower() expects parameter 1 to be string, array given #117

Description

@DangerLifter

Got an exception: strtolower() expects parameter 1 to be string, array given in /http-client/src/Response.php:36

Test url with problem: http://mosmama.info/org/user/2275/contact

Issues happens because header "transfer-encoding" contains "Transfer-Encoding: chunked, chunked"
Browser "Firefox" processes this case correctly.

Activity

  1. clue commented on Jan 16, 2018

    @clue
    Member

    Thank you for reporting, I can confirm that there's an issue in this library 👍

    The Response class should not report an error here and try to handle this situation in a sane way as per RFC 7230: https://tools.ietf.org/html/rfc7230#section-3.3.3

    Note that this URL you've provided is indeed "invalid" as it actually uses double encoded chunks, so this doesn't render properly in Firefox or any other HTTP client either. As per the HTTP specs the HTTP client should interpret one such encoding and thus return a response that is still encoded once.

    It may take a while before I get to look into this, so any help with addressing this is much appreciated :shipit:

  2. added this to the v0.5.7 milestone on Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions