X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_api.c;h=04564afc7ee39c2b21856ff2e79e1cc8bfaef0a8;hp=1e6ac3a2a8e6479ffcb2398867df0a4016ee661e;hb=3fae71eb51f3b0f09cf61639991a44051da8c0bc;hpb=9d8cf5d730afef90ea9dcabc606d732e52e15306 diff --git a/http_message_api.c b/http_message_api.c index 1e6ac3a..04564af 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -99,7 +99,7 @@ PHP_HTTP_API void _http_message_parse_headers_callback(void **message, char *htt if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) { new->type = HTTP_MSG_RESPONSE; new->info.response.http_version = atof(http_line + lenof("HTTP/")); - new->info.response.status = atoi(http_line + lenof("HTTP/1.1 ")); + new->info.response.code = atoi(http_line + lenof("HTTP/1.1 ")); } else // request if (!strncmp(http_line + line_length - lenof("HTTP/1.1"), "HTTP/1.", lenof("HTTP/1."))) { @@ -135,7 +135,7 @@ PHP_HTTP_API void _http_message_tostring(http_message *msg, char **string, size_ case HTTP_MSG_RESPONSE: phpstr_appendf(&str, "HTTP/%1.1f %d" HTTP_CRLF, msg->info.response.http_version, - msg->info.response.status); + msg->info.response.code); break; }