- fix dep on SPL in PHP-5.1
[m6w6/ext-http] / http_message_api.c
index f7492280357be5e32fdd79b9e7ed6ad2c7537668..d175201913996af652c287015b218d1de52c1842 100644 (file)
@@ -188,7 +188,8 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
                if (c = http_message_header(msg, "Content-Range")) {
                        ulong total = 0, start = 0, end = 0, len = 0;
                        
-                       if (!strncasecmp(Z_STRVAL_P(c), "bytes=", lenof("bytes="))) {
+                       if (!strncasecmp(Z_STRVAL_P(c), "bytes", lenof("bytes")) && 
+                                       (Z_STRVAL_P(c)[lenof("bytes")] == '=' || Z_STRVAL_P(c)[lenof("bytes")] == ' ')) {
                                char *total_at = NULL, *end_at = NULL;
                                char *start_at = Z_STRVAL_P(c) + lenof("bytes=");