cvs: pecl /http http_message_api.c http_request_object.c package2.xml php_http.h /http/tests HttpRequest_007.phpt
| From: | Michael Wallner | Date: | Thu, 16 Feb 2006 09:09:23 +0000 |
| Subject: | cvs: pecl /http http_message_api.c http_request_object.c package2.xml php_http.h /http/tests HttpRequest_007.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5191@lists.php.net to get a copy of this message | ||
mike Thu Feb 16 09:09:23 2006 UTC
Modified files:
/pecl/http http_message_api.c http_request_object.c package2.xml
php_http.h
/pecl/http/tests HttpRequest_007.phpt
Log:
- fixed message chain order in HttpRequest::getHistory()
# no need to reverse there; I got tricked by my own toString() impl
http://cvs.php.net/viewcvs.cgi/pecl/http/http_message_api.c?r1=1.72&r2=1.73&diff_format=u
Index: pecl/http/http_message_api.c
diff -u pecl/http/http_message_api.c:1.72 pecl/http/http_message_api.c:1.73
--- pecl/http/http_message_api.c:1.72 Tue Feb 14 18:08:06 2006
+++ pecl/http/http_message_api.c Thu Feb 16 09:09:23 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_message_api.c,v 1.72 2006/02/14 18:08:06 mike Exp $ */
+/* $Id: http_message_api.c,v 1.73 2006/02/16 09:09:23 mike Exp $ */
#define HTTP_WANT_SAPI
#define HTTP_WANT_CURL
@@ -404,9 +404,7 @@
PHP_HTTP_API http_message *_http_message_interconnect(http_message *m1, http_message *m2)
{
- if (!m1) {
- return NULL;
- } else if (m2) {
+ if (m1 && m2) {
int i = 0, c1, c2;
http_message *t1 = m1, *t2 = m2, *p1, *p2;
@@ -424,6 +422,8 @@
t1 = p1;
t2 = p2;
}
+ } else if (!m1 && m2) {
+ m1 = m2;
}
return m1;
}
http://cvs.php.net/viewcvs.cgi/pecl/http/http_request_object.c?r1=1.112&r2=1.113&diff_format=u
Index: pecl/http/http_request_object.c
diff -u pecl/http/http_request_object.c:1.112 pecl/http/http_request_object.c:1.113
--- pecl/http/http_request_object.c:1.112 Tue Feb 14 18:08:06 2006
+++ pecl/http/http_request_object.c Thu Feb 16 09:09:23 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_request_object.c,v 1.112 2006/02/14 18:08:06 mike Exp $ */
+/* $Id: http_request_object.c,v 1.113 2006/02/16 09:09:23 mike Exp $ */
#define HTTP_WANT_CURL
#include "php_http.h"
@@ -572,28 +572,17 @@
zval *headers, *message, *resp;
if (zval_is_true(GET_PROP(recordHistory))) {
- /* we need to act like a zipper, as we'll receive
- * the requests and the responses in separate chains
- * for redirects
- */
+ zval *hist, *history = GET_PROP(history);
http_message *response = http_message_parse(PHPSTR_VAL(&obj->request->conv.response),
PHPSTR_LEN(&obj->request->conv.response));
http_message *request = http_message_parse(PHPSTR_VAL(&obj->request->conv.request),
PHPSTR_LEN(&obj->request->conv.request));
- if (response && request) {
- zval *hist, *history = GET_PROP(history);
- http_message *hist_msg = http_message_reverse(http_message_interconnect(response, request));
-
- MAKE_STD_ZVAL(hist);
- ZVAL_OBJVAL(hist, http_message_object_new_ex(http_message_object_ce, hist_msg, NULL), 0);
- if (Z_TYPE_P(history) == IS_OBJECT) {
- http_message_object_prepend(hist, history);
- }
- SET_PROP(history, hist);
- zval_ptr_dtor(&hist);
- } else {
- http_message_free(&response);
- http_message_free(&request);
+ MAKE_STD_ZVAL(hist);
+ ZVAL_OBJVAL(hist, http_message_object_new_ex(http_message_object_ce,
http_message_interconnect(response, request), NULL), 0);
+ if (Z_TYPE_P(history) == IS_OBJECT) {
+ http_message_object_prepend(hist, history);
}
+ SET_PROP(history, hist);
+ zval_ptr_dtor(&hist);
}
UPD_PROP(long, responseCode, msg->http.info.response.code);
http://cvs.php.net/viewcvs.cgi/pecl/http/package2.xml?r1=1.61&r2=1.62&diff_format=u
Index: pecl/http/package2.xml
diff -u pecl/http/package2.xml:1.61 pecl/http/package2.xml:1.62
--- pecl/http/package2.xml:1.61 Wed Feb 15 18:44:12 2006
+++ pecl/http/package2.xml Thu Feb 16 09:09:23 2006
@@ -37,7 +37,7 @@
</lead>
<date>2006-00-00</date>
<version>
- <release>0.23.1</release>
+ <release>0.23.2</release>
<api>0.23.0</api>
</version>
<stability>
@@ -46,7 +46,7 @@
</stability>
<license>BSD, revised</license>
<notes><![CDATA[
-* Fixed http_parse_cookie(), really.
+* Fixed message chain order in HttpRequest::getHistory().
]]></notes>
<contents>
<dir name="/">
http://cvs.php.net/viewcvs.cgi/pecl/http/php_http.h?r1=1.121&r2=1.122&diff_format=u
Index: pecl/http/php_http.h
diff -u pecl/http/php_http.h:1.121 pecl/http/php_http.h:1.122
--- pecl/http/php_http.h:1.121 Wed Feb 15 18:44:12 2006
+++ pecl/http/php_http.h Thu Feb 16 09:09:23 2006
@@ -10,12 +10,12 @@
+--------------------------------------------------------------------+
*/
-/* $Id: php_http.h,v 1.121 2006/02/15 18:44:12 mike Exp $ */
+/* $Id: php_http.h,v 1.122 2006/02/16 09:09:23 mike Exp $ */
#ifndef PHP_EXT_HTTP_H
#define PHP_EXT_HTTP_H
-#define PHP_EXT_HTTP_VERSION "0.23.1"
+#define PHP_EXT_HTTP_VERSION "0.23.2"
#ifdef HAVE_CONFIG_H
# include "config.h"
http://cvs.php.net/viewcvs.cgi/pecl/http/tests/HttpRequest_007.phpt?r1=1.4&r2=1.5&diff_format=u
Index: pecl/http/tests/HttpRequest_007.phpt
diff -u pecl/http/tests/HttpRequest_007.phpt:1.4 pecl/http/tests/HttpRequest_007.phpt:1.5
--- pecl/http/tests/HttpRequest_007.phpt:1.4 Tue Feb 14 17:18:54 2006
+++ pecl/http/tests/HttpRequest_007.phpt Thu Feb 16 09:09:23 2006
@@ -19,14 +19,13 @@
?>
--EXPECTF--
%sTEST
-string(%d) "HTTP/1.1 200 OK
-Date: %s
-Server: Apache/%s
-X-Powered-By: PHP/5%s
-Vary: Accept-Encoding
-Content-Type: text/html
-X-Original-Transfer-Encoding: chunked
+string(%d) "PUT /.print_put.php5 HTTP/1.1
+User-Agent: PECL::HTTP/%s
+Host: dev.iworks.at
+Accept: */*
+Content-Type: text/plain
Content-Length: 281
+Expect: 100-continue
<?php
echo "-TEST\n";
@@ -41,13 +40,14 @@
?>
HTTP/1.1 100 Continue
-PUT /.print_put.php5 HTTP/1.1
-User-Agent: PECL::HTTP/%s
-Host: dev.iworks.at
-Accept: */*
-Content-Type: text/plain
+HTTP/1.1 200 OK
+Date: %s
+Server: %s
+X-Powered-By: %s
+Vary: Accept-Encoding
+Content-Type: text/html
+X-Original-Transfer-Encoding: chunked
Content-Length: 281
-Expect: 100-continue
<?php
echo "-TEST\n";
@@ -63,4 +63,3 @@
"
Done
-