- http_request_defaults() already takes care of resetting curl options so check strin...
[m6w6/ext-http] / php_http_send_api.h
index 9d79a2d49cd364d10ddaafb4387f4f5b90396949..ff4e2c0d3c319bfc6b3939db17de871605853a7f 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2005, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
 #ifndef PHP_HTTP_SEND_API_H
 #define PHP_HTTP_SEND_API_H
 
-#include "SAPI.h"
-#include "php_streams.h"
-#include "php_http_std_defs.h"
-
 typedef enum {
        SEND_DATA,
        SEND_RSRC
 } http_send_mode;
 
+#define HTTP_REDIRECT          302L
+#define HTTP_REDIRECT_AUTO       0L
+#define HTTP_REDIRECT_PERM     301L
+#define HTTP_REDIRECT_POST     303L
+#define HTTP_REDIRECT_TEMP     307L
+
+extern PHP_MINIT_FUNCTION(http_send);
+
 #define http_send_status(s) sapi_header_op(SAPI_HEADER_SET_STATUS, (void *) (s) TSRMLS_CC)
 #define http_send_header(n, v, r) _http_send_header_ex((n), strlen(n), (v), strlen(v), (r) TSRMLS_CC)
 #define http_send_header_ex(n, nl, v, vl, r, s) _http_send_header_ex((n), (nl), (v), (vl), (r), (s) TSRMLS_CC)
@@ -62,6 +66,9 @@ PHP_HTTP_API STATUS _http_send_ex(const void *data, size_t data_size, http_send_
 #define http_send_stream_ex(s, c, nc) _http_send_stream_ex((s), (c), (nc) TSRMLS_CC)
 PHP_HTTP_API STATUS _http_send_stream_ex(php_stream *s, zend_bool close_stream, zend_bool no_cache TSRMLS_DC);
 
+#define http_guess_content_type(mf, mm, d, l, m) _http_guess_content_type((mf), (mm), (d), (l), (m) TSRMLS_CC)
+PHP_HTTP_API char *_http_guess_content_type(const char *magic_file, long magic_mode, void *data_ptr, size_t data_len, http_send_mode mode TSRMLS_DC);
+
 #endif
 
 /*