A few changes to the FamilySearch server configuration broke the previous parsing:
HTTP version changed to 2 from 1.x
No more HTTP status text ('OK' or 'Timeout')
Header names are now all lowercase
statusText is never used internally, and since the string no longer exists in the response, I switched to using curl_getinfo to natively get the statusCode and removed references to statusText. This allows a much simpler, regex-free parsing of the headers and response body, which is now done by splitting on the empty line (\r\n\r\n).
A few changes to the FamilySearch server configuration broke the previous parsing:
statusText
is never used internally, and since the string no longer exists in the response, I switched to usingcurl_getinfo
to natively get thestatusCode
and removed references tostatusText
. This allows a much simpler, regex-free parsing of the headers and response body, which is now done by splitting on the empty line (\r\n\r\n
).