X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_api.c;h=17f6c7796a18f003336212521affb5a1dd2ba86d;hp=096ee7c7fcefd746d22874433a9049e232efd256;hb=d8d4c50ac3637c4fafae5cec91501795b334c11e;hpb=2d01dadb270b6f83e7e6ecb596f99c06b68b2ae0 diff --git a/http_message_api.c b/http_message_api.c index 096ee7c..17f6c77 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2007, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -91,8 +91,8 @@ PHP_HTTP_API http_message *_http_message_init_env(http_message *message, http_me memset(&inf, 0, sizeof(http_info)); switch (inf.type = type) { case HTTP_MSG_REQUEST: - if ((sval = http_get_server_var("SERVER_PROTOCOL", 1)) && !strncmp(Z_STRVAL_P(sval), ZEND_STRL("HTTP/"))) { - inf.http.version = atof(Z_STRVAL_P(sval) + lenof("HTTP/")); + if ((sval = http_get_server_var("SERVER_PROTOCOL", 1)) && !strncmp(Z_STRVAL_P(sval), "HTTP/", lenof("HTTP/"))) { + inf.http.version = zend_strtod(Z_STRVAL_P(sval) + lenof("HTTP/"), NULL); } else { inf.http.version = 1.1; }