X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http.c;h=56ae91d1024f3a3c3aa5292df29393aa85b32bd3;hb=cf4b3590c1439ae0c70c7819f67308799b75ad1f;hp=e81deffd554b40bfeeb90e4650df77c283997858;hpb=7dedd1935ab8400dfbd49fe63c83b74b0d0b68e6;p=m6w6%2Fext-http diff --git a/http.c b/http.c index e81deff..56ae91d 100644 --- a/http.c +++ b/http.c @@ -15,10 +15,20 @@ /* $Id$ */ +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + #ifdef HAVE_CONFIG_H #include "config.h" #endif +#if defined(HAVE_CURL) && HAVE_CURL +# ifdef PHP_WIN32 +# include +# include +# endif +#include +#endif + #include "php.h" #include "snprintf.h" #include "ext/standard/info.h" @@ -29,10 +39,6 @@ #include "php_http.h" #include "php_http_api.h" -#if defined(HAVE_CURL) && HAVE_CURL -#include -#endif - ZEND_DECLARE_MODULE_GLOBALS(http) #ifdef COMPILE_DL_HTTP @@ -481,7 +487,7 @@ PHP_FUNCTION(http_redirect) sprintf(RED, "Redirecting to %s.\n", URI, URI); } efree(URI); - + if ((SUCCESS == http_send_header(LOC)) && (SUCCESS == http_send_status((permanent ? 301 : 302)))) { php_body_write(RED, strlen(RED) TSRMLS_CC); RETURN_TRUE;