Skip to content

Conversation

hboie
Copy link

@hboie hboie commented Oct 9, 2020

when the server doesn't send the "Continue" keyword in the "HTTP/1.1 100" header, this header will not be stripped correctly.

Then also the rest of the header will not be stripped correctly, but ends up in the response_body, which causes an expection
when trying to convert the JSON data of the response_body.

…TTP/1.1 100" header, this header will not be stripped correctly.

Then also the rest of the header will not be stripped correctly, but ends up in the response_body, which causes an expection
when trying to convert the JSON data of the response_body.
@david-puente
Copy link

I solve this with:

    $header_size = curl_getinfo($curlHandle, CURLINFO_HEADER_SIZE);
    $this->response_headers = substr($response, 0, $header_size);
    $this->response_body = substr($response, $header_size);

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

Successfully merging this pull request may close these issues.

2 participants