From c1782429f025af40d805d9c1b5b9d4416465318e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 5 Dec 2008 09:12:45 +0000 Subject: [PATCH 1/1] fix bug #15223 (http_parse_message cust off more than message headers); fix compile warnings; --- php_http_api.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/php_http_api.h b/php_http_api.h index 4407122..fa0c1c8 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -168,9 +168,9 @@ static inline void _http_sleep(double s) #define HTTP_MLLISEC (1000) #define HTTP_MCROSEC (1000 * 1000) #define HTTP_NANOSEC (1000 * 1000 * 1000) -#define HTTP_MSEC(s) (s * HTTP_MLLISEC) -#define HTTP_USEC(s) (s * HTTP_MCROSEC) -#define HTTP_NSEC(s) (s * HTTP_NANOSEC) +#define HTTP_MSEC(s) ((long)(s * HTTP_MLLISEC)) +#define HTTP_USEC(s) ((long)(s * HTTP_MCROSEC)) +#define HTTP_NSEC(s) ((long)(s * HTTP_NANOSEC)) #if defined(PHP_WIN32) Sleep((DWORD) HTTP_MSEC(s)); @@ -227,7 +227,7 @@ static inline const char *_http_locate_body(const char *message) if (*(msg+1) == '\n') { body = msg + 2; break; - } else if (*(msg+1) == '\r' && *(msg+2) == '\n' && msg != message && *(msg-1) == '\r') { + } else if (*(msg+1) == '\r' && *(msg+2) == '\n') { body = msg + 3; break; } -- 2.30.2