+++ /dev/null
-<?php
-
-function hl($m)
-{
- return sprintf("<blockquote>%s</blockquote>\n", highlight_string($m[1], true));
-}
-function mf($f, &$m)
-{
- return preg_match_all(
- '/\/\* *\{\{\{ *proto (.*?)(\n|$)(.*?)PHP_(?:FUNCTION|METHOD)\((.*?)\)/s',
- file_get_contents($f), $m);
-}
-function ff($t)
-{
- $t = preg_replace('/^ \* /m', '', trim($t, "*/ \n"));
- $t = preg_replace_callback('/(\<\?php.*?\?\>)/s', 'hl', $t);
- $t = nl2br(preg_replace('/\n *\* */', "\n", $t));
- $t = preg_replace('/(\<br \/\>\n)+\<pre\>(\<br \/\>\n)+/', '</p><pre>', $t);
- $t = preg_replace('/(\<br \/\>\n)+\<\/pre\>(\<br \/\>\n)+/', '</pre><p>', $t);
- return sprintf('<p>%s</p>', ltrim($t, ' *'));
-}
-
-$preface = <<<_PREFACE
-<html>
-<head>
- <title>Function Summary of ext/%s</title>
- <style>
- body {
- font-size: 80%%;
- font-family: sans-serif;
- }
- h2 {
- color: #339;
- clear: both;
- font-size: 1.2em;
- background: #ffc;
- padding: .2em;
- }
- p {
- margin-left: 1em;
- }
- pre {
- font-size: 1.2em;
- }
- br {
- display: none;
- }
- blockquote {
- margin-bottom: 3em;
- border: 1px solid #ccc;
- background: #f0f0f0;
- padding: 0em 1em;
- width: auto;
- float: left;
- }
- p br, pre code br {
- display: block;
- }
- </style>
-</head>
-<body>
-_PREFACE;
-
-$footer = <<<_FOOTER
- <p><b>Generated at: %s</b></p>
-</body>
-</html>
-_FOOTER;
-
-if ($_SERVER['argc'] < 2) {
- die("Usage: {$_SERVER['argv'][0]} <file>[ <file> ...]\n");
-}
-
-printf($preface, basename(getcwd()));
-
-foreach (array_slice($_SERVER['argv'], 1) as $f) {
- if (mf($f, $m)) {
- printf("<h1>%s</h1>\n", basename($f));
- foreach ($m[1] as $i => $p) {
- printf("<h2 id=\"%s\">%s</h2>\n%s\n",
- str_replace(', ', '_', $m[4][$i]), $p, ff($m[3][$i]));
- }
- print "<hr noshade>\n";
- }
-}
-
-printf($footer, date('r'));
-?>
\ No newline at end of file
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="http" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
-\r
-CFG=http - Win32 Release_TS\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "http.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "http.mak" CFG="http - Win32 Release_TS"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "http - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "http - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-MTL=midl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "http - Win32 Release_TS"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release_TS"\r
-# PROP BASE Intermediate_Dir "Release_TS"\r
-# PROP BASE Ignore_Export_Lib 0\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release_TS"\r
-# PROP Intermediate_Dir "Release_TS"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_HTTP" /D ZTS=1 /YX /FD /c\r
-# ADD CPP /nologo /Gd /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HTTP_EXPORTS" /D "COMPILE_DL_HTTP" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_HTTP=1 /D HTTP_HAVE_CURL=1 /FR /YX /FD /c\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x406 /d "NDEBUG"\r
-# ADD RSC /l 0x406 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386\r
-# ADD LINK32 libcurl.lib ssleay32.lib libeay32.lib zlib.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_http.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\..\php_build\curl\lib"\r
-\r
-!ELSEIF "$(CFG)" == "http - Win32 Debug_TS"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Debug_TS"\r
-# PROP BASE Intermediate_Dir "Debug_TS"\r
-# PROP BASE Ignore_Export_Lib 0\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Debug_TS"\r
-# PROP Intermediate_Dir "Debug_TS"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_HTTP" /D ZTS=1 /YX /FD /c\r
-# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HTTP_EXPORTS" /D "COMPILE_DL_HTTP" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_HTTP=1 /D HTTP_HAVE_CURL=1 /YX /FD /c\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x406 /d "NDEBUG"\r
-# ADD RSC /l 0x406 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386\r
-# ADD LINK32 libcurl.lib ssleay32.lib libeay32.lib zlib.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib wsock32.lib /nologo /dll /machine:I386 /out:"..\..\Debug_TS/http.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\php_build\curl\lib"\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "http - Win32 Release_TS"\r
-# Name "http - Win32 Debug_TS"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=.\http.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_api.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_curl_api.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_functions.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_methods.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# Begin Source File\r
-\r
-SOURCE=.\php_http.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\php_http_api.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\php_http_curl_api.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\php_http_std_defs.h\r
-# End Source File\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# End Group\r
-# End Target\r
-# End Project\r
+++ /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_send_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