fix tests
authorMichael Wallner <mike@php.net>
Fri, 12 Jun 2015 10:27:28 +0000 (12:27 +0200)
committerMichael Wallner <mike@php.net>
Fri, 12 Jun 2015 10:27:28 +0000 (12:27 +0200)
php_http_message.c
php_http_message_body.c
tests/info001.phpt
tests/info002.phpt
tests/messagebody003.phpt

index 3d3822cfeeb8326e455e5aae29d8d1afa93e8b38..4f21a838fec3d03ef0107d56f042c74051ab198b 100644 (file)
@@ -912,7 +912,7 @@ static HashTable *php_http_message_object_get_props(zval *object)
                zend_property_info *pi; \
                if ((pi = zend_hash_str_find_ptr(&obj->zo.ce->properties_info, name_str, lenof(name_str)))) { \
                        action_with_tmp; \
-                       zend_hash_update(props, pi->name, &tmp); \
+                       zend_hash_update_ind(props, pi->name, &tmp); \
                } \
        } while(0)
 
index 4a3174a62a785c649d563ad7281874435d97e88f..22179e413a52555f11c04a3af1286a2c739cfdd3 100644 (file)
@@ -93,8 +93,7 @@ void php_http_message_body_free(php_http_message_body_t **body_ptr)
                php_http_message_body_t *body = *body_ptr;
 
                if (!--body->refcount) {
-                       /* NOFIXME: shows leakinfo in DEBUG mode */
-                       zend_list_delete(body->res);
+                       //zend_list_close(body->res);
                        PTR_FREE(body->boundary);
                        efree(body);
                }
index 8209669f60d4fa773e9b6903225bdf5a9978410e..6b829efa437af453c83ae53f001c1b41b9042797 100644 (file)
@@ -24,15 +24,15 @@ var_dump(new http\Message("GET / HTTP/1.1"));
 ?>
 DONE
 --EXPECTF--
-exception 'http\Exception\BadMessageException' with message 'http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 3 of 'GET HTTP/1.1'' in %s
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 3 of 'GET HTTP/1.1' in %s
 Stack trace:
 #0 %s: http\Message->__construct('GET HTTP/1.1')
 #1 {main}
-exception 'http\Exception\BadMessageException' with message 'http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 3 of 'GET HTTP/1.123'' in %s
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 3 of 'GET HTTP/1.123' in %s
 Stack trace:
 #0 %s: http\Message->__construct('GET HTTP/1.123')
 #1 {main}
-exception 'http\Exception\BadMessageException' with message 'http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 7 of 'GETHTTP/1.1'' %s
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 7 of 'GETHTTP/1.1' %s
 Stack trace:
 #0 %s: http\Message->__construct('GETHTTP/1.1')
 #1 {main}
index 093dcd169c63e3334271666cb390efa4693f4cba..3c71be58fe9899261141a3e17302134478964a42 100644 (file)
@@ -32,13 +32,13 @@ echo new http\Message("CONNECT www.example.org:80 HTTP/1.1");
 ===DONE===
 --EXPECTF--
 Test
-exception 'http\Exception\BadMessageException' with message 'http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket'' in %sinfo002.php:%d
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...')
 #1 %sinfo002.php(%d): {closure}()
 #2 %sinfo002.php(%d): trap(Object(Closure))
 #3 {main}
-exception 'http\Exception\BadMessageException' with message 'http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1'' in %sinfo002.php:%d
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....')
 #1 %sinfo002.php(%d): {closure}()
index 7b79e6aa90bd41e335b4805f90723d785186fd3c..8444cbf770e2c9f3b7673b53009932788f728447 100644 (file)
@@ -19,7 +19,7 @@ try {
 DONE
 --EXPECTF--
 Test
-exception 'http\Exception\RuntimeException' with message 'http\Message\Body::append(): Failed to append 4 bytes to body; wrote 0' in %s:%d
+http\Exception\RuntimeException: http\Message\Body::append(): Failed to append 4 bytes to body; wrote 0 in %s:%d
 Stack trace:
 #0 %s(%d): http\Message\Body->append('nope')
 #1 {main}