X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_std_defs.h;h=1b08ffdd4c7dbf2e90297cb4d5c5da5dd0566b72;hp=792ddda4319095ad39970a62cd2044c20d105307;hb=930e15c0f50743465332dcf3e1036ff11ef2150e;hpb=8e6cf53b544342e1eaf0ec4f530e32852120294a diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 792ddda..1b08ffd 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2007, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -104,11 +104,14 @@ typedef int STATUS; /* max URL length */ #define HTTP_URL_MAXLEN 4096 +/* max request method length */ +#define HTTP_REQUEST_METHOD_MAXLEN 31 + /* def URL arg separator */ #define HTTP_URL_ARGSEP "&" /* send buffer size */ -#define HTTP_SENDBUF_SIZE 8000 /*40960*/ +#define HTTP_SENDBUF_SIZE 40960 /* CURL buffer size */ #define HTTP_CURLBUF_SIZE 16384 @@ -216,8 +219,8 @@ typedef int STATUS; #ifdef ZEND_ENGINE_2 # define with_error_handling(eh, ec) \ { \ - error_handling_t __eh = PG(error_handling); \ - zend_class_entry *__ec= PG(exception_class); \ + error_handling_t __eh = GLOBAL_ERROR_HANDLING; \ + zend_class_entry *__ec= GLOBAL_EXCEPTION_CLASS; \ php_set_error_handling(eh, ec TSRMLS_CC); # define end_error_handling() \ php_set_error_handling(__eh, __ec TSRMLS_CC); \ @@ -263,8 +266,8 @@ typedef int STATUS; #define HTTP_E_QUERYSTRING 13L #ifdef ZEND_ENGINE_2 -# define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args) static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args) -# define HTTP_BEGIN_ARGS_AR(class, method, ret_ref, req_args) static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 1, ret_ref, req_args) +# define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args) HTTP_STATIC_ARG_INFO ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args) +# define HTTP_BEGIN_ARGS_AR(class, method, ret_ref, req_args) HTTP_STATIC_ARG_INFO ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 1, ret_ref, req_args) # define HTTP_END_ARGS } # define HTTP_EMPTY_ARGS_EX(class, method, ret_ref) HTTP_BEGIN_ARGS_EX(class, method, ret_ref, 0) HTTP_END_ARGS # define HTTP_ARGS(class, method) args_for_ ##class## _ ##method @@ -281,20 +284,20 @@ typedef int STATUS; #ifdef HTTP_HAVE_CURL # ifdef ZEND_ENGINE_2 # define HTTP_DECLARE_ARG_PASS_INFO() \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_3, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_4, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ @@ -302,7 +305,7 @@ typedef int STATUS; ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_5, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ @@ -321,13 +324,20 @@ typedef int STATUS; #else # ifdef ZEND_ENGINE_2 # define HTTP_DECLARE_ARG_PASS_INFO() \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ + ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_3, 0) \ + ZEND_ARG_PASS_INFO(0) \ + ZEND_ARG_PASS_INFO(0) \ + ZEND_ARG_PASS_INFO(1) \ + ZEND_END_ARG_INFO(); \ +\ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_4, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ @@ -337,6 +347,7 @@ typedef int STATUS; # else # define HTTP_DECLARE_ARG_PASS_INFO() \ static unsigned char http_arg_pass_ref_2[] = {2, BYREF_NONE, BYREF_FORCE}; \ + static unsigned char http_arg_pass_ref_3[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE}; \ static unsigned char http_arg_pass_ref_4[] = {4, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE}; # endif /* ZEND_ENGINE_2 */ #endif /* HTTP_HAVE_CURL */