projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- php_info fun
[m6w6/ext-http]
/
http_send_api.c
diff --git
a/http_send_api.c
b/http_send_api.c
index 6dfc677f993b5be0eef58657c291506311b986c8..3f6f2a6ef524c75e9b5071b9ba8e52cd55338eba 100644
(file)
--- a/
http_send_api.c
+++ b/
http_send_api.c
@@
-289,6
+289,7
@@
PHP_HTTP_API STATUS _http_send_ranges(HashTable *ranges, const void *data, size_
/* multi range */
else {
/* multi range */
else {
+ size_t preface_len;
char bound[23] = {0}, preface[1024] = {0},
multi_header[68] = "Content-Type: multipart/byteranges; boundary=";
char bound[23] = {0}, preface[1024] = {0},
multi_header[68] = "Content-Type: multipart/byteranges; boundary=";
@@
-307,7
+308,7
@@
PHP_HTTP_API STATUS _http_send_ranges(HashTable *ranges, const void *data, size_
break;
}
break;
}
- snprintf(preface, 1023,
+
preface_len =
snprintf(preface, 1023,
HTTP_CRLF "%s"
HTTP_CRLF "Content-Type: %s"
HTTP_CRLF "Content-Range: bytes %ld-%ld/%lu"
HTTP_CRLF "%s"
HTTP_CRLF "Content-Type: %s"
HTTP_CRLF "Content-Range: bytes %ld-%ld/%lu"
@@
-321,7
+322,7
@@
PHP_HTTP_API STATUS _http_send_ranges(HashTable *ranges, const void *data, size_
(ulong) size
);
(ulong) size
);
- PHPWRITE(preface,
strlen(preface)
);
+ PHPWRITE(preface,
preface_len
);
http_send_chunk(data, Z_LVAL_PP(zbegin), Z_LVAL_PP(zend) + 1, mode);
}
http_send_chunk(data, Z_LVAL_PP(zbegin), Z_LVAL_PP(zend) + 1, mode);
}