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 3d3822c..4f21a83 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 4a3174a..22179e4 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 8209669..6b829ef 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 093dcd1..3c71be5 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 7b79e6a..8444cbf 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}