projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- ditch HttpMessage::__construct() and ::setRaw
[m6w6/ext-http]
/
http_send_api.c
diff --git
a/http_send_api.c
b/http_send_api.c
index 0fa18daa01c546c12b34c120c5b318eda0e1586a..41ba3058e556d1089853ecf3e2d670ce10696531 100644
(file)
--- a/
http_send_api.c
+++ b/
http_send_api.c
@@
-330,6
+330,9
@@
PHP_HTTP_API STATUS _http_send(const void *data_ptr, size_t data_size, http_send
HTTP_G(etag_started) = 0;
}
HTTP_G(etag_started) = 0;
}
+ /* enable partial dl and resume */
+ http_send_header("Accept-Ranges: bytes");
+
zend_hash_init(&ranges, 0, NULL, ZVAL_PTR_DTOR, 0);
range_status = http_get_request_ranges(&ranges, data_size);
zend_hash_init(&ranges, 0, NULL, ZVAL_PTR_DTOR, 0);
range_status = http_get_request_ranges(&ranges, data_size);
@@
-362,14
+365,14
@@
PHP_HTTP_API STATUS _http_send(const void *data_ptr, size_t data_size, http_send
return FAILURE;
}
if (http_match_etag("HTTP_IF_NONE_MATCH", etag)) {
return FAILURE;
}
if (http_match_etag("HTTP_IF_NONE_MATCH", etag)) {
- return http_cache_exit(etag, 1, 1);
+ return http_cache_exit
_ex
(etag, 1, 1);
}
efree(etag);
}
/* send 304 Not Modified if last modified matches */
if (http_match_last_modified("HTTP_IF_MODIFIED_SINCE", HTTP_G(lmod))) {
}
efree(etag);
}
/* send 304 Not Modified if last modified matches */
if (http_match_last_modified("HTTP_IF_MODIFIED_SINCE", HTTP_G(lmod))) {
- return http_cache_exit(http_date(HTTP_G(lmod)), 0, 1);
+ return http_cache_exit
_ex
(http_date(HTTP_G(lmod)), 0, 1);
}
/* send full entity */
}
/* send full entity */