- implement feature request: 'bodyonly' request option;
[m6w6/ext-http] / php_http.h
index 210055064f70f55ad3258e66ca9b75bd6f068e06..8e724af7ba09dcd259b6d08f46754dcbcd4ece4c 100644 (file)
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
-#define HTTP_PEXT_VERSION "0.18.1"
+#define PHP_EXT_HTTP_VERSION "0.20.0dev"
 
-/* make compile on Win32 */
-#ifdef HTTP_HAVE_CURL
+#include "php.h"
+#include "php_http_std_defs.h"
+#include "phpstr/phpstr.h"
+#include "missing.h"
+
+
+#ifdef HTTP_WANT_NETDB
+#      ifdef PHP_WIN32
+#              include <winsock2.h>
+#      elif defined(HAVE_NETDB_H)
+#              include <netdb.h>
+#      endif
+#endif
+
+#if defined(HTTP_WANT_CURL) && defined(HTTP_HAVE_CURL)
 #      ifdef PHP_WIN32
 #              include <winsock2.h>
 #      endif
 #      include <curl/curl.h>
 #endif
 
-#include "phpstr/phpstr.h"
+#if defined(HTTP_WANT_MAGIC) && defined(HTTP_HAVE_MAGIC)
+#      if defined(PHP_WIN32) && !defined(USE_MAGIC_DLL) && !defined(USE_MAGIC_STATIC)
+#              define USE_MAGIC_STATIC
+#      endif
+#      include <magic.h>
+#endif
+
+#if defined(HTTP_WANT_ZLIB) && defined(HTTP_HAVE_ZLIB)
+#      include <zlib.h>
+#endif
+
+#include <ctype.h>
 
 extern zend_module_entry http_module_entry;
 #define phpext_http_ptr &http_module_entry
@@ -35,7 +59,7 @@ extern int http_module_number;
 ZEND_BEGIN_MODULE_GLOBALS(http)
 
        struct _http_globals_etag {
-               long mode;
+               char *mode;
                void *ctx;
                zend_bool started;
        } etag;
@@ -98,6 +122,7 @@ PHP_FUNCTION(http_date);
 PHP_FUNCTION(http_build_uri);
 PHP_FUNCTION(http_negotiate_language);
 PHP_FUNCTION(http_negotiate_charset);
+PHP_FUNCTION(http_negotiate_content_type);
 PHP_FUNCTION(http_redirect);
 PHP_FUNCTION(http_throttle);
 PHP_FUNCTION(http_send_status);