projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
* strlen("") => sizeof("")-1
[m6w6/ext-http]
/
http_api.c
diff --git
a/http_api.c
b/http_api.c
index bee02cc01ff592551d911c0ee11bd5b6d006b1a2..5840edacb94123622c91fb3377bf9e06b3b80fda 100644
(file)
--- a/
http_api.c
+++ b/
http_api.c
@@
-564,7
+564,7
@@
PHP_HTTP_API inline time_t _http_lmod(const void *data_ptr, const http_send_mode
PHP_HTTP_API inline int _http_is_range_request(TSRMLS_D)
{
return zend_hash_exists(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]),
PHP_HTTP_API inline int _http_is_range_request(TSRMLS_D)
{
return zend_hash_exists(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]),
- "HTTP_RANGE", s
trlen("HTTP_RANGE") + 1
);
+ "HTTP_RANGE", s
izeof("HTTP_RANGE")
);
}
/* }}} */
}
/* }}} */
@@
-1036,13
+1036,13
@@
PHP_HTTP_API http_range_status _http_get_request_ranges(zval *zranges,
HTTP_GSC(zrange, "HTTP_RANGE", RANGE_NO);
range = Z_STRVAL_P(zrange);
HTTP_GSC(zrange, "HTTP_RANGE", RANGE_NO);
range = Z_STRVAL_P(zrange);
- if (strncmp(range, "bytes=", s
trlen("bytes=")
)) {
+ if (strncmp(range, "bytes=", s
izeof("bytes=") - 1
)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Range header misses bytes=");
return RANGE_NO;
}
ptr = &begin;
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Range header misses bytes=");
return RANGE_NO;
}
ptr = &begin;
- range += s
trlen("bytes=")
;
+ range += s
izeof("bytes=") - 1
;
do {
switch (c = *(range++))
do {
switch (c = *(range++))
@@
-1464,8
+1464,8
@@
PHP_HTTP_API STATUS _http_parse_headers(char *header, int header_len, zval *arra
if (!strncmp(header, "HTTP/1.", 7)) {
char *end = strstr(header, HTTP_CRLF);
add_assoc_stringl(array, "Status",
if (!strncmp(header, "HTTP/1.", 7)) {
char *end = strstr(header, HTTP_CRLF);
add_assoc_stringl(array, "Status",
- header + s
trlen("HTTP/1.x ")
,
- end - (header + s
trlen("HTTP/1.x ")
), 1);
+ header + s
izeof("HTTP/1.x ") - 1
,
+ end - (header + s
izeof("HTTP/1.x ") - 1
), 1);
header = end + 2;
}
header = end + 2;
}
@@
-1588,4
+1588,4
@@
PHP_HTTP_API STATUS _http_auth_credentials(char **user, char **pass TSRMLS_DC)
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
-
+