--- /dev/null
+--TEST--
+http_date() with timestamp
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+echo http_date(1), "\n";
+echo http_date(1234567890), "\n";
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+Thu, 01 Jan 1970 00:00:01 GMT
+Fri, 13 Feb 2009 23:31:30 GMT
--- /dev/null
+--TEST--
+http_date() without timestamp
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+$d1 = http_date();
+$d2 = http_date();
+var_dump($d1 === $d2);
+echo strtotime($d1), "\n$d1\n$d2\n";
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+bool(true)
+%d
+%s, %d %s %d %d:%d:%d GMT
+%s, %d %s %d %d:%d:%d GMT
--- /dev/null
+--TEST--
+http_absolute_uri() with relative paths
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+echo http_absolute_uri('page'), "\n";
+echo http_absolute_uri('with/some/path/'), "\n";
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+http://localhost/page
+http://localhost/with/some/path/
--- /dev/null
+--TEST--
+http_absolute_uri() with proto
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+echo http_absolute_uri('sec', 'https'), "\n";
+echo http_absolute_uri('/pub', 'ftp'), "\n";
+echo http_absolute_uri('/', null), "\n";
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+https://localhost/sec
+ftp://localhost/pub
+http://localhost/
--- /dev/null
+--TEST--
+http_redirect() with params
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+http_redirect('redirect', array('a' => 1, 'b' => 2));
+?>
+--EXPECTF--
+Status: 302
+Content-type: text/html
+X-Powered-By: PHP/%s
+Location: http://localhost/redirect?a=1&b=2
+
+Redirecting to <a href="http://localhost/redirect?a=1&b=2">http://localhost/redirect?a=1&b=2</a>.
+
--- /dev/null
+--TEST--
+http_redirect() with session
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+session_start();
+http_redirect('redirect', array('a' => 1), true);
+?>
+--EXPECTF--
+Status: 302
+Content-type: text/html
+X-Powered-By: PHP/%s
+Set-Cookie: PHPSESSID=%s; path=/
+Expires: %s
+Cache-Control: %s
+Pragma: %s
+Location: http://localhost/redirect?a=1&PHPSESSID=%s
--- /dev/null
+--TEST--
+http_redirect() permanent
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+http_redirect('redirect', null, false, true);
+?>
+--EXPECTF--
+Status: 301
+Content-type: text/html
+X-Powered-By: PHP/%s
+Location: http://localhost/redirect
+
+Redirecting to <a href="http://localhost/redirect">http://localhost/redirect</a>.
+
--- /dev/null
+--TEST--
+http_send_data()
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+http_content_type('text/plain');
+http_send_data(str_repeat('123abc', 1));
+?>
+--EXPECTREGEX--
+.+\s+.+\s+(abc|[123abc]{,100000})
\ No newline at end of file
--- /dev/null
+--TEST--
+http_chunked_decode()
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+$data =
+"02\r\n".
+"ab\r\n".
+"03\r\n".
+"a\nc\r\n".
+"04\r\n".
+"abcd\r\n".
+"0\r\n".
+"abracadabra\n";
+var_dump(http_chunked_decode($data));
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+string(9) "aba
+cabcd"
--- /dev/null
+--TEST--
+http_split_response()
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+var_export(http_split_response("HTTP/1.1 200 Ok\r\nContent-Type: text/plain\r\nContent-Language: de-AT\r\nDate: Sat, 22 Jan 2005 18:10:02 GMT\r\n\r\nHallo Du!)"));
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+array (
+ 0 =>
+ array (
+ 'Status' => '200 Ok',
+ 'Content-Type' => 'text/plain',
+ 'Content-Language' => 'de-AT',
+ 'Date' => 'Sat, 22 Jan 2005 18:10:02 GMT',
+ ),
+ 1 => 'Hallo Du!',
+)
\ No newline at end of file
--- /dev/null
+--TEST--
+http_parse_headers()
+--SKIPIF--
+<?php
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+print_r(http_parse_headers(
+"Host: localhost\r\n".
+"Nospace:here\r\n".
+"Muchspace: there \r\n".
+"Empty:\r\n".
+"Empty2: \r\n".
+": invalid\r\n".
+" : bogus\r\n".
+"Folded: one\r\n".
+"\ttwo\r\n".
+" three\r\n".
+"stop\r\n"
+));
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+Array
+(
+ [Host] => localhost
+ [Nospace] => here
+ [Muchspace] => there
+ [Empty] =>
+ [Empty2] =>
+ [Folded] => one
+ two
+ three
+)
\ No newline at end of file