cvs: pecl /http http.c http_api.c http_send_api.c package2.xml php_http.h php_http_std_defs.h /http/tests HttpResponse_004.phpt build_url_003.phpt
negotiation_001.phpt send_data_001.phpt send_data_002.phpt send_data_003.phpt send_data_005.phpt send_failed_precond_001.phpt send_file_005.phpt
send_file_009.phpt send_file_010.phpt send_file_011.phpt send_file_013.phpt send_ifrange_001.phpt send_ifrange_003.phpt ut_HttpMessage.phpt
ut_HttpRequest.phpt ut_HttpRequestPool.phpt ut_HttpUtil.phpt

From: Date: Wed, 22 Nov 2006 10:50:11 +0000
Subject: cvs: pecl /http http.c http_api.c http_send_api.c package2.xml php_http.h php_http_std_defs.h /http/tests HttpResponse_004.phpt build_url_003.phpt
negotiation_001.phpt send_data_001.phpt send_data_002.phpt send_data_003.phpt send_data_005.phpt send_failed_precond_001.phpt send_file_005.phpt
send_file_009.phpt send_file_010.phpt send_file_011.phpt send_file_013.phpt send_ifrange_001.phpt send_ifrange_003.phpt ut_HttpMessage.phpt
ut_HttpRequest.phpt ut_HttpRequestPool.phpt ut_HttpUtil.phpt
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-6658@lists.php.net to get a copy of this message
mike Wed Nov 22 10:50:11 2006 UTC Removed files: /pecl/http/tests ut_HttpMessage.phpt ut_HttpRequest.phpt ut_HttpRequestPool.phpt ut_HttpUtil.phpt Modified files: /pecl/http http.c http_api.c http_send_api.c package2.xml php_http.h php_http_std_defs.h /pecl/http/tests HttpResponse_004.phpt build_url_003.phpt negotiation_001.phpt send_data_001.phpt send_data_002.phpt send_data_003.phpt send_data_005.phpt send_failed_precond_001.phpt send_file_005.phpt send_file_009.phpt send_file_010.phpt send_file_011.phpt send_file_013.phpt send_ifrange_001.phpt send_ifrange_003.phpt Log: - improve response performance . flag streams non-buffered . bypass sapi input filter . flush explicitly only if throttling is used - fix tests

http://cvs.php.net/viewvc.cgi/pecl/http/http.c?r1=1.182&r2=1.183&diff_format=u Index: pecl/http/http.c diff -u pecl/http/http.c:1.182 pecl/http/http.c:1.183 --- pecl/http/http.c:1.182 Mon Oct 2 11:48:37 2006 +++ pecl/http/http.c Wed Nov 22 10:50:10 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: http.c,v 1.182 2006/10/02 11:48:37 mike Exp $ */ +/* $Id: http.c,v 1.183 2006/11/22 10:50:10 mike Exp $ */ #define HTTP_WANT_SAPI #define HTTP_WANT_CURL @@ -206,6 +206,10 @@ } STR_SET(G->send.content_type, NULL); STR_SET(G->send.unquoted_etag, NULL); + if (G->server_var) { + zval_ptr_dtor(&G->server_var); + G->server_var = NULL; + } } /* }}} */ http://cvs.php.net/viewvc.cgi/pecl/http/http_api.c?r1=1.159&r2=1.160&diff_format=u Index: pecl/http/http_api.c diff -u pecl/http/http_api.c:1.159 pecl/http/http_api.c:1.160 --- pecl/http/http_api.c:1.159 Mon Nov 20 11:15:06 2006 +++ pecl/http/http_api.c Wed Nov 22 10:50:10 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: http_api.c,v 1.159 2006/11/20 11:15:06 mike Exp $ */ +/* $Id: http_api.c,v 1.160 2006/11/22 10:50:10 mike Exp $ */ #define HTTP_WANT_SAPI #include "php_http.h" @@ -267,11 +267,26 @@ /* {{{ zval *http_get_server_var_ex(char *, size_t) */ PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_size, zend_bool check TSRMLS_DC) { - zval **hsv; - zval **var; + zval **hsv, **var; + char *env; + + /* if available, this is a lot faster than accessing $_SERVER */ + if (sapi_module.getenv) { + if ((!(env = sapi_module.getenv((char *) key, key_size TSRMLS_CC))) || (check && !*env)) { + return NULL; + } + if (HTTP_G->server_var) { + zval_ptr_dtor(&HTTP_G->server_var); + } + MAKE_STD_ZVAL(HTTP_G->server_var); + ZVAL_STRING(HTTP_G->server_var, env, 1); + return HTTP_G->server_var; + } + #ifdef ZEND_ENGINE_2 zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC); #endif + if ((SUCCESS != zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void *) &hsv)) || (Z_TYPE_PP(hsv) != IS_ARRAY)) { return NULL; } http://cvs.php.net/viewvc.cgi/pecl/http/http_send_api.c?r1=1.65&r2=1.66&diff_format=u Index: pecl/http/http_send_api.c diff -u pecl/http/http_send_api.c:1.65 pecl/http/http_send_api.c:1.66 --- pecl/http/http_send_api.c:1.65 Tue Oct 17 19:13:16 2006 +++ pecl/http/http_send_api.c Wed Nov 22 10:50:10 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: http_send_api.c,v 1.65 2006/10/17 19:13:16 mike Exp $ */ +/* $Id: http_send_api.c,v 1.66 2006/11/22 10:50:10 mike Exp $ */ #define HTTP_WANT_SAPI #define HTTP_WANT_ZLIB @@ -27,19 +27,20 @@ #include "php_http_headers_api.h" #include "php_http_send_api.h" +/* {{{ http_flush() */ #define http_flush(d, l) _http_flush(NULL, (d), (l) TSRMLS_CC) -/* {{{ static inline void http_flush() */ static inline void _http_flush(void *nothing, const char *data, size_t data_len TSRMLS_DC) { PHPWRITE(data, data_len); - php_end_ob_buffer(1, 1 TSRMLS_CC); - sapi_flush(TSRMLS_C); - -#if 0 - fprintf(stderr, "Flushing after writing %u bytes\n", (uint) data_len); -#endif - + /* we really only need to flush when throttling is enabled, + because we push the data as fast as possible anyway if not */ if (HTTP_G->send.throttle_delay >= HTTP_DIFFSEC) { + if (OG(ob_nesting_level)) { + php_end_ob_buffer(1, 1 TSRMLS_CC); + } + if (!OG(implicit_flush)) { + sapi_flush(TSRMLS_C); + } http_sleep(HTTP_G->send.throttle_delay); } } @@ -58,6 +59,8 @@ HTTP_DEFLATE_TYPE_GZIP : HTTP_DEFLATE_TYPE_ZLIB); #endif } + /* flush headers */ + sapi_flush(TSRMLS_C); } /* }}} */ @@ -93,19 +96,20 @@ #define http_send_response_data_fetch(b, d, l, m, s, e) _http_send_response_data_fetch((b), (d), (l), (m), (s), (e) TSRMLS_CC) static inline void _http_send_response_data_fetch(void **buffer, const void *data, size_t data_len, http_send_mode mode, size_t begin, size_t end TSRMLS_DC) { - char *buf; - long got, len = end - begin; + long bsz, got, len = end - begin; + + if (!(bsz = HTTP_G->send.buffer_size)) { + bsz = HTTP_SENDBUF_SIZE; + } switch (mode) { - case SEND_RSRC: - { + case SEND_RSRC: { php_stream *s = (php_stream *) data; - if (SUCCESS == php_stream_seek(s, begin, SEEK_SET)) { - buf = emalloc(HTTP_SENDBUF_SIZE); + char *buf = emalloc(bsz); while (len > 0) { - got = php_stream_read(s, buf, MIN(len, HTTP_SENDBUF_SIZE)); + got = php_stream_read(s, buf, MIN(len, bsz)); http_send_response_data_plain(buffer, buf, got); len -= got; } @@ -114,20 +118,16 @@ } break; } - - case SEND_DATA: - { - buf = (char *) data + begin; - + case SEND_DATA: { + const char *buf = data + begin; while (len > 0) { - got = MIN(len, HTTP_SENDBUF_SIZE); + got = MIN(len, bsz); http_send_response_data_plain(buffer, buf, got); len -= got; buf += got; } break; } - EMPTY_SWITCH_DEFAULT_CASE(); } } @@ -507,6 +507,7 @@ { STATUS status; php_stream_statbuf ssb; + int orig_flags; if ((!file) || php_stream_stat(file, &ssb)) { char *defct = sapi_get_default_content_type(TSRMLS_C); @@ -522,8 +523,11 @@ return FAILURE; } + orig_flags = file->flags; + file->flags |= PHP_STREAM_FLAG_NO_BUFFER; status = http_send_ex(file, ssb.sb.st_size, SEND_RSRC, no_cache); - + file->flags = orig_flags; + if (close_stream) { php_stream_close(file); } http://cvs.php.net/viewvc.cgi/pecl/http/package2.xml?r1=1.138&r2=1.139&diff_format=u Index: pecl/http/package2.xml diff -u pecl/http/package2.xml:1.138 pecl/http/package2.xml:1.139 --- pecl/http/package2.xml:1.138 Thu Nov 9 13:42:28 2006 +++ pecl/http/package2.xml Wed Nov 22 10:50:10 2006 @@ -28,7 +28,7 @@ <email>mike@php.net</email> <active>yes</active> </lead> - <date>2006-11-05</date> + <date>2006-11-22</date> <version> <release>1.4.0dev</release> <api>1.4.0</api> @@ -39,6 +39,7 @@ </stability> <license>BSD, revised</license> <notes><![CDATA[ +* Improved response performance + Added "ipresolve" request option + Added HTTP_IPRESOLVE_{ANY|V4|V6}, HttpRequest::IPRESOLVE_{ANY|V4|V6} constants + Added missing HTTP_SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3}, HttpRequest::SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3} constants @@ -271,8 +272,6 @@ <file role="test" name="stream_filters_001.phpt"/> <file role="test" name="stream_filters_002.phpt"/> <file role="test" name="stream_filters_003.phpt"/> - <file role="test" name="ut_HttpMessage.phpt"/> - <file role="test" name="ut_HttpUtil.phpt"/> </dir> </dir> </contents> http://cvs.php.net/viewvc.cgi/pecl/http/php_http.h?r1=1.173&r2=1.174&diff_format=u Index: pecl/http/php_http.h diff -u pecl/http/php_http.h:1.173 pecl/http/php_http.h:1.174 --- pecl/http/php_http.h:1.173 Sun Nov 5 19:01:49 2006 +++ pecl/http/php_http.h Wed Nov 22 10:50:10 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: php_http.h,v 1.173 2006/11/05 19:01:49 mike Exp $ */ +/* $Id: php_http.h,v 1.174 2006/11/22 10:50:10 mike Exp $ */ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H @@ -144,6 +144,7 @@ zend_bool force_exit; zend_bool read_post_data; + zval *server_var; ZEND_END_MODULE_GLOBALS(http) http://cvs.php.net/viewvc.cgi/pecl/http/php_http_std_defs.h?r1=1.92&r2=1.93&diff_format=u Index: pecl/http/php_http_std_defs.h diff -u pecl/http/php_http_std_defs.h:1.92 pecl/http/php_http_std_defs.h:1.93 --- pecl/http/php_http_std_defs.h:1.92 Mon Nov 20 11:15:06 2006 +++ pecl/http/php_http_std_defs.h Wed Nov 22 10:50:10 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: php_http_std_defs.h,v 1.92 2006/11/20 11:15:06 mike Exp $ */ +/* $Id: php_http_std_defs.h,v 1.93 2006/11/22 10:50:10 mike Exp $ */ #ifndef PHP_HTTP_STD_DEFS_H #define PHP_HTTP_STD_DEFS_H @@ -111,7 +111,7 @@ #define HTTP_URL_ARGSEP "&" /* send buffer size */ -#define HTTP_SENDBUF_SIZE 40960 +#define HTTP_SENDBUF_SIZE 8000 /*40960*/ /* CURL buffer size */ #define HTTP_CURLBUF_SIZE 16384 http://cvs.php.net/viewvc.cgi/pecl/http/tests/HttpResponse_004.phpt?r1=1.5&r2=1.6&diff_format=u Index: pecl/http/tests/HttpResponse_004.phpt diff -u pecl/http/tests/HttpResponse_004.phpt:1.5 pecl/http/tests/HttpResponse_004.phpt:1.6 --- pecl/http/tests/HttpResponse_004.phpt:1.5 Tue Mar 28 09:50:47 2006 +++ pecl/http/tests/HttpResponse_004.phpt Wed Nov 22 10:50:10 2006 @@ -7,10 +7,11 @@ checkmin(5.1); skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support"); ?> +--ENV-- +HTTP_IF_NONE_MATCH="900150983cd24fb0d6963f7d28e17f72" +HTTP_ACCEPT_ENCODING=gzip --FILE-- <?php -$_SERVER["HTTP_IF_NONE_MATCH"] = '"900150983cd24fb0d6963f7d28e17f72"'; -$_SERVER["HTTP_ACCEPT_ENCODING"] = "gzip"; HttpResponse::setGzip(true); HttpResponse::setCache(true); HttpResponse::setCacheControl('public', 3600); http://cvs.php.net/viewvc.cgi/pecl/http/tests/build_url_003.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/http/tests/build_url_003.phpt diff -u pecl/http/tests/build_url_003.phpt:1.1 pecl/http/tests/build_url_003.phpt:1.2 --- pecl/http/tests/build_url_003.phpt:1.1 Sun Dec 18 22:27:39 2005 +++ pecl/http/tests/build_url_003.phpt Wed Nov 22 10:50:11 2006 @@ -4,9 +4,10 @@ <?php include 'skip.inc'; ?> +--ENV-- +HTTP_HOST=www.example.com --FILE-- <?php -$_SERVER['HTTP_HOST'] = 'www.example.com'; $url = '/path/?query#anchor'; echo "-TEST\n"; printf("-%s-\n", http_build_url($url)); http://cvs.php.net/viewvc.cgi/pecl/http/tests/negotiation_001.phpt?r1=1.5&r2=1.6&diff_format=u Index: pecl/http/tests/negotiation_001.phpt diff -u pecl/http/tests/negotiation_001.phpt:1.5 pecl/http/tests/negotiation_001.phpt:1.6 --- pecl/http/tests/negotiation_001.phpt:1.5 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/negotiation_001.phpt Wed Nov 22 10:50:11 2006 @@ -4,12 +4,13 @@ <?php include 'skip.inc'; ?> +--ENV-- +HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8 +HTTP_ACCEPT_LANGUAGE=de-AT,de-DE;q=0.8,en-GB;q=0.3,en-US;q=0.2 +HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7 --FILE-- <?php echo "-TEST\n"; -$_SERVER['HTTP_ACCEPT'] = 'application/xml, application/xhtml+xml, text/html ; q = .8'; -$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-AT,de-DE;q=0.8,en-GB;q=0.3,en-US;q=0.2'; -$_SERVER['HTTP_ACCEPT_CHARSET'] = 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'; $langs = array( array('de', 'en', 'es'), ); http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_data_001.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/http/tests/send_data_001.phpt diff -u pecl/http/tests/send_data_001.phpt:1.4 pecl/http/tests/send_data_001.phpt:1.5 --- pecl/http/tests/send_data_001.phpt:1.4 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_data_001.phpt Wed Nov 22 10:50:11 2006 @@ -5,9 +5,10 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=-5 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=-5'; http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> @@ -19,4 +20,4 @@ Content-Range: bytes 5995-5999/6000 Content-Length: 5 -23abc \ No newline at end of file +23abc http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_data_002.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/http/tests/send_data_002.phpt diff -u pecl/http/tests/send_data_002.phpt:1.4 pecl/http/tests/send_data_002.phpt:1.5 --- pecl/http/tests/send_data_002.phpt:1.4 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_data_002.phpt Wed Nov 22 10:50:11 2006 @@ -5,9 +5,10 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=5-6 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=5-6'; http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> @@ -19,4 +20,4 @@ Content-Range: bytes 5-6/6000 Content-Length: 2 -c1 \ No newline at end of file +c1 http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_data_003.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/http/tests/send_data_003.phpt diff -u pecl/http/tests/send_data_003.phpt:1.4 pecl/http/tests/send_data_003.phpt:1.5 --- pecl/http/tests/send_data_003.phpt:1.4 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_data_003.phpt Wed Nov 22 10:50:11 2006 @@ -5,9 +5,10 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=5981- --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=5981-'; http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> @@ -19,4 +20,4 @@ Content-Range: bytes 5981-5999/6000 Content-Length: 19 -c123abc123abc123abc \ No newline at end of file +c123abc123abc123abc http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_data_005.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/http/tests/send_data_005.phpt diff -u pecl/http/tests/send_data_005.phpt:1.3 pecl/http/tests/send_data_005.phpt:1.4 --- pecl/http/tests/send_data_005.phpt:1.3 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_data_005.phpt Wed Nov 22 10:50:11 2006 @@ -5,12 +5,13 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=5990-6000 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=5990-6000'; http_send_content_type('text/plain'); http_send_data(str_repeat('123abc', 1000)); ?> --EXPECTF-- Status: 416 -%s \ No newline at end of file +%s http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_failed_precond_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/http/tests/send_failed_precond_001.phpt diff -u pecl/http/tests/send_failed_precond_001.phpt:1.1 pecl/http/tests/send_failed_precond_001.phpt:1.2 --- pecl/http/tests/send_failed_precond_001.phpt:1.1 Thu Feb 16 17:49:54 2006 +++ pecl/http/tests/send_failed_precond_001.phpt Wed Nov 22 10:50:11 2006 @@ -6,10 +6,11 @@ checkcgi(); checkver(5.1); ?> +--ENV-- +HTTP_RANGE=bytes=0-1 +HTTP_IF_UNMODIFIED_SINCE=Thu, 01 Jan 1970 00:16:40 GMT --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=0-1'; -$_SERVER['HTTP_IF_UNMODIFIED_SINCE'] = http_date(10000); http_cache_last_modified(); http_send_file(__FILE__); ?> http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_file_005.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/http/tests/send_file_005.phpt diff -u pecl/http/tests/send_file_005.phpt:1.3 pecl/http/tests/send_file_005.phpt:1.4 --- pecl/http/tests/send_file_005.phpt:1.3 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_file_005.phpt Wed Nov 22 10:50:11 2006 @@ -5,9 +5,10 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=0-3, 4-5,9-11 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=0-3, 4-5,9-11'; http_send_content_type('text/plain'); http_send_file('data.txt'); ?> http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_file_009.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/http/tests/send_file_009.phpt diff -u pecl/http/tests/send_file_009.phpt:1.2 pecl/http/tests/send_file_009.phpt:1.3 --- pecl/http/tests/send_file_009.phpt:1.2 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_file_009.phpt Wed Nov 22 10:50:11 2006 @@ -6,9 +6,10 @@ checkcgi(); checkmin(5.1); ?> +--ENV-- +HTTP_RANGE=bytes=5-9 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=5-9'; http_send_file('data.txt'); ?> --EXPECTF-- http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_file_010.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/http/tests/send_file_010.phpt diff -u pecl/http/tests/send_file_010.phpt:1.2 pecl/http/tests/send_file_010.phpt:1.3 --- pecl/http/tests/send_file_010.phpt:1.2 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_file_010.phpt Wed Nov 22 10:50:11 2006 @@ -6,9 +6,10 @@ checkcgi(); checkmin(5.1); ?> +--ENV-- +HTTP_RANGE=bytes=-9 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=-9'; http_send_file('data.txt'); ?> --EXPECTF-- http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_file_011.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/http/tests/send_file_011.phpt diff -u pecl/http/tests/send_file_011.phpt:1.2 pecl/http/tests/send_file_011.phpt:1.3 --- pecl/http/tests/send_file_011.phpt:1.2 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_file_011.phpt Wed Nov 22 10:50:11 2006 @@ -6,9 +6,10 @@ checkcgi(); checkmin(5.1); ?> +--ENV-- +HTTP_RANGE=bytes=1000- --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=1000- '; http_send_file('data.txt'); ?> --EXPECTF-- http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_file_013.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/http/tests/send_file_013.phpt diff -u pecl/http/tests/send_file_013.phpt:1.2 pecl/http/tests/send_file_013.phpt:1.3 --- pecl/http/tests/send_file_013.phpt:1.2 Tue Jan 10 15:55:13 2006 +++ pecl/http/tests/send_file_013.phpt Wed Nov 22 10:50:11 2006 @@ -6,9 +6,10 @@ checkcgi(); checkmin(5.1); ?> +--ENV-- +HTTP_RANGE=bytes=-1111 --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=-1111'; http_send_file('data.txt'); ?> --EXPECTF-- http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_ifrange_001.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/http/tests/send_ifrange_001.phpt diff -u pecl/http/tests/send_ifrange_001.phpt:1.1 pecl/http/tests/send_ifrange_001.phpt:1.2 --- pecl/http/tests/send_ifrange_001.phpt:1.1 Thu Feb 16 17:49:54 2006 +++ pecl/http/tests/send_ifrange_001.phpt Wed Nov 22 10:50:11 2006 @@ -5,10 +5,11 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=0-1 +HTTP_IF_RANGE="abc" --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=0-1'; -$_SERVER['HTTP_IF_RANGE'] = '"abc"'; http_cache_etag('abc'); http_send_file(__FILE__); ?> http://cvs.php.net/viewvc.cgi/pecl/http/tests/send_ifrange_003.phpt?r1=1.1&r2=1.2&diff_format=u Index: pecl/http/tests/send_ifrange_003.phpt diff -u pecl/http/tests/send_ifrange_003.phpt:1.1 pecl/http/tests/send_ifrange_003.phpt:1.2 --- pecl/http/tests/send_ifrange_003.phpt:1.1 Thu Feb 16 17:49:54 2006 +++ pecl/http/tests/send_ifrange_003.phpt Wed Nov 22 10:50:11 2006 @@ -5,10 +5,11 @@ include 'skip.inc'; checkcgi(); ?> +--ENV-- +HTTP_RANGE=bytes=0-1 +HTTP_IF_RANGE="abcd" --FILE-- <?php -$_SERVER['HTTP_RANGE'] = 'bytes=0-1'; -$_SERVER['HTTP_IF_RANGE'] = '"abcd"'; http_cache_etag('abc'); http_send_file(__FILE__); ?>
« previous php.pecl.cvs (#6658) next »