- fix includes
authorMichael Wallner <mike@php.net>
Thu, 25 Aug 2005 12:45:31 +0000 (12:45 +0000)
committerMichael Wallner <mike@php.net>
Thu, 25 Aug 2005 12:45:31 +0000 (12:45 +0000)
- remove tests/README.txt as it is no longer true
- add parse_message test

http_cache_api.c
php_http.h
php_http_cache_api.h
tests/README.txt [deleted file]
tests/parse_message_001.phpt [new file with mode: 0644]

index 0c96f4a2593059fa274c214eb0f9e6f56b26e025..49843598a9425a03aed447ac7dd7cfe05915540b 100644 (file)
 #include "php_http_send_api.h"
 #include "php_http_date_api.h"
 
+#ifdef HAVE_LIBMHASH
+#      include <mhash.h>
+#endif
+
 ZEND_EXTERN_MODULE_GLOBALS(http);
 
 /* {{{ char *http_etag(void *, size_t, http_send_mode) */
index 9137b812c6eecb7036535f8ed42169d1fdb3f53b..f18f6d702d63906cfe87c79bedf5a82337cca6a8 100644 (file)
@@ -27,8 +27,7 @@
 #      endif
 #      include <curl/curl.h>
 #endif
-#include "ext/standard/md5.h"
-#include "ext/standard/sha1.h"
+
 #include "phpstr/phpstr.h"
 
 extern zend_module_entry http_module_entry;
index 8a9e55d83c820dab7ab6ec9ff6b1ee712d9c94fa..bef8cc8b97d14cdf94548db85c82868e261e3ddb 100644 (file)
 #ifndef PHP_HTTP_CACHE_API_H
 #define PHP_HTTP_CACHE_API_H
 
+#include "zend_ini.h"
+
+#include "ext/standard/md5.h"
+#include "ext/standard/sha1.h"
+
 #include "php_http_std_defs.h"
 #include "php_http.h"
 #include "php_http_api.h"
 #include "php_http_send_api.h"
 
-#include "zend_ini.h"
-
 #ifdef HAVE_LIBMHASH
 #      include <mhash.h>
 #endif
diff --git a/tests/README.txt b/tests/README.txt
deleted file mode 100644 (file)
index f9a1edb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Most of this tests fail with the standard run-tests script.
diff --git a/tests/parse_message_001.phpt b/tests/parse_message_001.phpt
new file mode 100644 (file)
index 0000000..c29422a
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+http_parse_message()
+--SKIPIF--
+include 'skip.inc';
+checkuri('www.google.com');
+--FILE--
+<?php
+echo "-TEST\n";
+echo http_parse_message(http_get('http://www.google.com'))->body;
+echo "Done\n";
+--EXPECTF--
+%sTEST
+<HTML>%sThe document has moved%s</HTML>
+Done