From dfe2dbf042d42f83255b6ff46c2210bcd57ca586 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 17 Oct 2005 16:23:16 +0000 Subject: [PATCH] - fix issues ifndef HTTP_HAVE_CURL - fix tests' skipif sections --- php_http_std_defs.h | 12 +++++++++++- tests/etag_mode_004.phpt | 2 ++ tests/etag_mode_012.phpt | 1 + tests/etag_mode_014.phpt | 2 ++ tests/etag_mode_crc.phpt | 5 ++++- tests/exceptions.phpt | 12 ++++++++---- tests/parse_message_001.phpt | 3 +++ tests/request_gzip.phpt | 1 + 8 files changed, 32 insertions(+), 6 deletions(-) diff --git a/php_http_std_defs.h b/php_http_std_defs.h index c297b64..4f9f93e 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -360,7 +360,17 @@ typedef int STATUS; static unsigned char http_arg_pass_ref_5[] = {5, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE}; # endif /* ZEND_ENGINE_2 */ #else -# define HTTP_DECLARE_ARG_PASS_INFO() +# ifdef ZEND_ENGINE_2 +# define HTTP_DECLARE_ARG_PASS_INFO() \ + static \ + ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ + ZEND_ARG_PASS_INFO(0) \ + ZEND_ARG_PASS_INFO(1) \ + ZEND_END_ARG_INFO(); +# else +# define HTTP_DECLARE_ARG_PASS_INFO() \ + static unsigned char http_arg_pass_ref_2[] = {2, BYREF_NONE, BYREF_FORCE}; +# endif /* ZEND_ENGINE_2 */ #endif /* HTTP_HAVE_CURL */ diff --git a/tests/etag_mode_004.phpt b/tests/etag_mode_004.phpt index 571933e..c1920ce 100644 --- a/tests/etag_mode_004.phpt +++ b/tests/etag_mode_004.phpt @@ -4,6 +4,8 @@ mhash etag --FILE-- --FILE-- --FILE-- --FILE-- $c) { printf("%2d: %s\n", $i, get_class($x)); } } -try { - $tmp = http_get(null); -} catch (HttpRequestException $x) { - printf("%s (%d)\n", $x->getMessage(), $x->getCode()); +if (http_support(HTTP_SUPPORT_REQUESTS)) { + try { + $tmp = http_get(null); + } catch (HttpRequestException $x) { + printf("%s (%d)\n", $x->getMessage(), $x->getCode()); + } +} else { + echo "Could not perform request: URL using bad/illegal format or missing URL (8)\n"; } echo "Done\n"; ?> diff --git a/tests/parse_message_001.phpt b/tests/parse_message_001.phpt index 4d36b46..ac31338 100644 --- a/tests/parse_message_001.phpt +++ b/tests/parse_message_001.phpt @@ -1,8 +1,11 @@ --TEST-- http_parse_message() --SKIPIF-- + --FILE-- --FILE--