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:
a673ef7
)
- only addref if we remember the stream
author
Michael Wallner
<mike@php.net>
Tue, 6 Sep 2005 12:01:42 +0000
(12:01 +0000)
committer
Michael Wallner
<mike@php.net>
Tue, 6 Sep 2005 12:01:42 +0000
(12:01 +0000)
http_response_object.c
patch
|
blob
|
history
diff --git
a/http_response_object.c
b/http_response_object.c
index 423b7b7054f8081c4c661146790093917e455faf..4f31e3158fd050871e93b89df2c09eb7c9318d59 100644
(file)
--- a/
http_response_object.c
+++ b/
http_response_object.c
@@
-707,9
+707,8
@@
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);
+ php_stream_from_zval(the_real_stream, &the_stream);
if (php_stream_stat(the_real_stream, &ssb)) {
RETURN_FALSE;
}
if (php_stream_stat(the_real_stream, &ssb)) {
RETURN_FALSE;
}
@@
-718,7
+717,8
@@
PHP_METHOD(HttpResponse, setStream)
(SUCCESS != UPD_STATIC_PROP(long, mode, SEND_RSRC))) {
RETURN_FALSE;
}
(SUCCESS != UPD_STATIC_PROP(long, mode, SEND_RSRC))) {
RETURN_FALSE;
}
-
+ zend_list_addref(Z_LVAL_P(the_stream));
+
if (!(Z_LVAL_P(GET_STATIC_PROP(lastModified)) > 0)) {
UPD_STATIC_PROP(long, lastModified, http_last_modified(the_real_stream, SEND_RSRC));
}
if (!(Z_LVAL_P(GET_STATIC_PROP(lastModified)) > 0)) {
UPD_STATIC_PROP(long, lastModified, http_last_modified(the_real_stream, SEND_RSRC));
}