Skip to content

last header in response does not get parsed #23

Description

@peter12s

In AsyncHttpClient.cpp at line 635 you initialize the String headerData with context->responseBuffer.substring(0, headerEnd) before passing it to parseResponseHeaders.
This means that the end of the string headerData does not contain '\r\n'.
In the function parseResponseHeaders you search for '\r\n' in order to find every header. So the last header is missed in this case.
Therefore I think line 635 should be as follows: String headerData = context->responseBuffer.substring(0, headerEnd + 2);

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions