cvs: pecl /http http_api.c http_functions.c http_request_object.c php_http_send_api.h
| From: | Michael Wallner | Date: | Mon, 20 Feb 2006 16:06:21 +0000 |
| Subject: | cvs: pecl /http http_api.c http_functions.c http_request_object.c php_http_send_api.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5214@lists.php.net to get a copy of this message | ||
mike Mon Feb 20 16:06:21 2006 UTC
Modified files:
/pecl/http http_api.c http_functions.c http_request_object.c
php_http_send_api.h
Log:
- need php_stream_open_wrapper_*ex* to pass a stream context
http://cvs.php.net/viewcvs.cgi/pecl/http/http_api.c?r1=1.142&r2=1.143&diff_format=u
Index: pecl/http/http_api.c
diff -u pecl/http/http_api.c:1.142 pecl/http/http_api.c:1.143
--- pecl/http/http_api.c:1.142 Mon Feb 20 15:59:37 2006
+++ pecl/http/http_api.c Mon Feb 20 16:06:21 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_api.c,v 1.142 2006/02/20 15:59:37 mike Exp $ */
+/* $Id: http_api.c,v 1.143 2006/02/20 16:06:21 mike Exp $ */
#define HTTP_WANT_SAPI
#include "php_http.h"
@@ -116,7 +116,7 @@
#define HTTP_LOG_WRITE(file, type, msg) \
if (file && *file) { \
- php_stream *log = php_stream_open_wrapper(file, "ab", REPORT_ERRORS|ENFORCE_SAFE_MODE,
HTTP_DEFAULT_STREAM_CONTEXT); \
+ php_stream *log = php_stream_open_wrapper_ex(file, "ab",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT); \
\
if (log) { \
php_stream_printf(log TSRMLS_CC, "%s\t[%s]\t%s\t<%s>%s", datetime, type, msg,
SG(request_info).request_uri, PHP_EOL); \
http://cvs.php.net/viewcvs.cgi/pecl/http/http_functions.c?r1=1.122&r2=1.123&diff_format=u
Index: pecl/http/http_functions.c
diff -u pecl/http/http_functions.c:1.122 pecl/http/http_functions.c:1.123
--- pecl/http/http_functions.c:1.122 Mon Feb 20 15:59:37 2006
+++ pecl/http/http_functions.c Mon Feb 20 16:06:21 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_functions.c,v 1.122 2006/02/20 15:59:37 mike Exp $ */
+/* $Id: http_functions.c,v 1.123 2006/02/20 16:06:21 mike Exp $ */
#define HTTP_WANT_SAPI
#define HTTP_WANT_CURL
@@ -1502,7 +1502,7 @@
RETURN_FALSE;
}
- if (!(stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE,
HTTP_DEFAULT_STREAM_CONTEXT))) {
+ if (!(stream = php_stream_open_wrapper_ex(file, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE,
NULL, HTTP_DEFAULT_STREAM_CONTEXT))) {
RETURN_FALSE;
}
if (php_stream_stat(stream, &ssb)) {
http://cvs.php.net/viewcvs.cgi/pecl/http/http_request_object.c?r1=1.114&r2=1.115&diff_format=u
Index: pecl/http/http_request_object.c
diff -u pecl/http/http_request_object.c:1.114 pecl/http/http_request_object.c:1.115
--- pecl/http/http_request_object.c:1.114 Mon Feb 20 15:59:37 2006
+++ pecl/http/http_request_object.c Mon Feb 20 16:06:21 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_request_object.c,v 1.114 2006/02/20 15:59:37 mike Exp $ */
+/* $Id: http_request_object.c,v 1.115 2006/02/20 16:06:21 mike Exp $ */
#define HTTP_WANT_CURL
#include "php_http.h"
@@ -450,7 +450,7 @@
case HTTP_PUT:
{
php_stream_statbuf ssb;
- php_stream *stream = php_stream_open_wrapper(Z_STRVAL_P(GET_PROP(putFile)), "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, HTTP_DEFAULT_STREAM_CONTEXT);
+ php_stream *stream = php_stream_open_wrapper_ex(Z_STRVAL_P(GET_PROP(putFile)), "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT);
if (stream && !php_stream_stat(stream, &ssb)) {
obj->request->body = http_request_body_init_ex(obj->request->body,
HTTP_REQUEST_BODY_UPLOADFILE, stream, ssb.sb.st_size, 1);
http://cvs.php.net/viewcvs.cgi/pecl/http/php_http_send_api.h?r1=1.13&r2=1.14&diff_format=u
Index: pecl/http/php_http_send_api.h
diff -u pecl/http/php_http_send_api.h:1.13 pecl/http/php_http_send_api.h:1.14
--- pecl/http/php_http_send_api.h:1.13 Mon Feb 20 15:59:37 2006
+++ pecl/http/php_http_send_api.h Mon Feb 20 16:06:21 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_send_api.h,v 1.13 2006/02/20 15:59:37 mike Exp $ */
+/* $Id: php_http_send_api.h,v 1.14 2006/02/20 16:06:21 mike Exp $ */
#ifndef PHP_HTTP_SEND_API_H
#define PHP_HTTP_SEND_API_H
@@ -61,8 +61,8 @@
#define http_send_ex(d, s, m, nc) _http_send_ex((d), (s), (m), (nc) TSRMLS_CC)
PHP_HTTP_API STATUS _http_send_ex(const void *data, size_t data_size, http_send_mode mode,
zend_bool no_cache TSRMLS_DC);
-#define http_send_file(f) http_send_stream_ex(php_stream_open_wrapper(f, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, HTTP_DEFAULT_STREAM_CONTEXT), 1, 0)
-#define http_send_file_ex(f, nc) http_send_stream_ex(php_stream_open_wrapper(f, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, HTTP_DEFAULT_STREAM_CONTEXT), 1, (nc))
+#define http_send_file(f) http_send_stream_ex(php_stream_open_wrapper_ex(f, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT), 1, 0)
+#define http_send_file_ex(f, nc) http_send_stream_ex(php_stream_open_wrapper_ex(f, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT), 1, (nc))
#define http_send_stream(s) http_send_stream_ex((s), 0, 0)
#define http_send_stream_ex(s, c, nc) _http_send_stream_ex((s), (c), (nc) TSRMLS_CC)
PHP_HTTP_API STATUS _http_send_stream_ex(php_stream *s, zend_bool close_stream, zend_bool no_cache
TSRMLS_DC);