#ifndef PHP_EXT_HTTP_H
#define PHP_EXT_HTTP_H
-#define HTTP_PEXT_VERSION "0.18.0dev"
+#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
ZEND_BEGIN_MODULE_GLOBALS(http)
struct _http_globals_etag {
- long mode;
+ char *mode;
void *ctx;
zend_bool started;
} etag;
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);