|
cvs: pecl /http config.m4 http_response_object.c /http/tests HttpResponse_: msg#00147php.pecl.cvs
mike Fri Jul 22 16:34:46 2005 EDT Added files: /pecl/http/tests HttpResponse_001.phpt HttpResponse_002.phpt Modified files: /pecl/http config.m4 http_response_object.c Log: - add response tests http://cvs.php.net/diff.php/pecl/http/config.m4?r1=1.18&r2=1.19&ty=u Index: pecl/http/config.m4 diff -u pecl/http/config.m4:1.18 pecl/http/config.m4:1.19 --- pecl/http/config.m4:1.18 Fri Jul 22 12:01:57 2005 +++ pecl/http/config.m4 Fri Jul 22 16:34:45 2005 @@ -1,5 +1,5 @@ dnl config.m4 for pecl/http -dnl $Id: config.m4,v 1.18 2005/07/22 16:01:57 mike Exp $ +dnl $Id: config.m4,v 1.19 2005/07/22 20:34:45 mike Exp $ PHP_ARG_ENABLE([http], [whether to enable extended HTTP support], [ --enable-http Enable extended HTTP support]) @@ -79,6 +79,8 @@ PHP_NEW_EXTENSION([http], $PHP_HTTP_SOURCES, [$ext_shared]) PHP_SUBST([HTTP_SHARED_LIBADD]) PHP_ADD_MAKEFILE_FRAGMENT + CFLAGS=" -g -O2 -W -Wchar-subscripts -Wformat=2 -Wno-format-y2k -Wimplicit -Wmissing-braces -Wunused-variable -Wuninitialized -Wstrict-aliasing -Wfloat-equal -Wshadow -Wbad-function-cast -Wpointer-arith -Wsign-compare -Winline" + PHP_SUBST([CFLAGS]) AC_DEFINE([HAVE_HTTP], [1], [Have extended HTTP support]) fi http://cvs.php.net/diff.php/pecl/http/http_response_object.c?r1=1.17&r2=1.18&ty=u Index: pecl/http/http_response_object.c diff -u pecl/http/http_response_object.c:1.17 pecl/http/http_response_object.c:1.18 --- pecl/http/http_response_object.c:1.17 Fri Jul 22 11:50:29 2005 +++ pecl/http/http_response_object.c Fri Jul 22 16:34:45 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http_response_object.c,v 1.17 2005/07/22 15:50:29 mike Exp $ */ +/* $Id: http_response_object.c,v 1.18 2005/07/22 20:34:45 mike Exp $ */ #ifdef HAVE_CONFIG_H @@ -155,7 +155,6 @@ {NULL, NULL, NULL} }; -static zend_object_handlers http_response_object_handlers; void _http_response_object_init(INIT_FUNC_ARGS) { @@ -269,7 +268,7 @@ #define HTTP_CACHECONTROL_TEMPLATE "%s, must-revalidate, max_age=%ld" - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &ccontrol, &cc_len, &max_age)) { + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &ccontrol, &cc_len, &max_age)) { RETURN_FALSE; } @@ -649,7 +648,7 @@ /* gzip */ if (Z_LVAL_P(GET_STATIC_PROP(gzip))) { - php_start_ob_buffer_named("ob_gzhandler", 0, 0 TSRMLS_CC); + php_start_ob_buffer_named("ob_gzhandler", 0, 1 TSRMLS_CC); } else { php_start_ob_buffer(NULL, 0, 0 TSRMLS_CC); } http://cvs.php.net/co.php/pecl/http/tests/HttpResponse_001.phpt?r=1.1&p=1 Index: pecl/http/tests/HttpResponse_001.phpt +++ pecl/http/tests/HttpResponse_001.phpt --TEST-- HttpResponse - send data with caching headers --SKIPIF-- <?php include 'skip.inc'; checkver(5); checkcgi(); ?> --FILE-- <?php HttpResponse::setCache(true); HttpResponse::setCacheControl('public', 3600); HttpResponse::setData('foobar'); HttpResponse::send(); ?> --EXPECTF-- X-Powered-By: PHP/%s ETag: "3858f62230ac3c915f300c664312c63f" Cache-Control: public, must-revalidate, max_age=3600 Last-Modified: %s, %d %s 20%d %d:%d:%d GMT Content-Type: %s Accept-Ranges: bytes foobar http://cvs.php.net/co.php/pecl/http/tests/HttpResponse_002.phpt?r=1.1&p=1 Index: pecl/http/tests/HttpResponse_002.phpt +++ pecl/http/tests/HttpResponse_002.phpt --TEST-- HttpResponse - send gzipped file --SKIPIF-- <?php include 'skip.inc'; checkver(5); checkcgi(); checkext('zlib'); ?> --ENV-- HTTP_ACCEPT_ENCODING=gzip --FILE-- <?php HttpResponse::setGzip(true); HttpResponse::setFile(__FILE__); HttpResponse::send(); ?> --EXPECTF-- X-Powered-By: PHP/%s Content-Type: %s Accept-Ranges: bytes Content-Encoding: gzip Vary: Accept-Encoding %s |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| News | FAQ | advertise |