projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
2127855
)
- fix stream handling
author
Michael Wallner
<mike@php.net>
Fri, 22 Jul 2005 09:43:30 +0000
(09:43 +0000)
committer
Michael Wallner
<mike@php.net>
Fri, 22 Jul 2005 09:43:30 +0000
(09:43 +0000)
http_response_object.c
patch
|
blob
|
history
diff --git
a/http_response_object.c
b/http_response_object.c
index a172c5d3c47b0e74c2db10ef0437b4857407703e..1f2b58001cc8507d79e02ad7a4ddfe64801f7035 100644
(file)
--- a/
http_response_object.c
+++ b/
http_response_object.c
@@
-511,6
+511,7
@@
PHP_METHOD(HttpResponse, setStream)
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &the_stream)) {
RETURN_FALSE;
}
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &the_stream)) {
RETURN_FALSE;
}
+ zend_list_addref(Z_LVAL_P(the_stream));
php_stream_from_zval(the_real_stream, &the_stream);
USE_STATIC_PROP();
php_stream_from_zval(the_real_stream, &the_stream);
USE_STATIC_PROP();
@@
-591,6
+592,9
@@
PHP_METHOD(HttpResponse, send)
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &clean_ob)) {
RETURN_FALSE;
}
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &clean_ob)) {
RETURN_FALSE;
}
+ if (SG(headers_sent)) {
+ RETURN_FALSE;
+ }
if (clean_ob) {
/* interrupt on-the-fly etag generation */
if (clean_ob) {
/* interrupt on-the-fly etag generation */
@@
-669,6
+673,7
@@
PHP_METHOD(HttpResponse, send)
{
php_stream *the_real_stream;
zval *the_stream = GET_STATIC_PROP(stream);
{
php_stream *the_real_stream;
zval *the_stream = GET_STATIC_PROP(stream);
+ the_stream->type = IS_RESOURCE;
php_stream_from_zval(the_real_stream, &the_stream);
RETURN_SUCCESS(http_send_stream(the_real_stream));
}
php_stream_from_zval(the_real_stream, &the_stream);
RETURN_SUCCESS(http_send_stream(the_real_stream));
}