- 1.5.0RC1
[m6w6/ext-http] / php_http_request_int.h
index e7449640f30efe3ea2eec981201b73b2fc2c0cf7..c45db8ac41c49f93f272e3bd1798a15ce4b94f2e 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
 #      endif /* PHP_WIN32 */
 #endif /* ZTS && HTTP_HAVE_SSL */
 
-#ifndef HAVE_CURL_EASY_STRERROR
-#      define curl_easy_strerror(dummy) "unknown error"
-#endif
-
 #define HTTP_CURL_OPT(OPTION, p) curl_easy_setopt((request->ch), OPTION, (p))
 
 #define HTTP_CURL_OPT_STRING(OPTION, ldiff, obdc) \
                HTTP_CURL_OPT_STRING_EX(K+lenof("CURLOPT_KEY")+ldiff, OPTION, obdc); \
        }
 #define HTTP_CURL_OPT_STRING_EX(keyname, optname, obdc) \
-       if (!strcasecmp(key, keyname)) { \
+       if (!strcasecmp(key.str, keyname)) { \
                zval *copy = http_request_option_cache_ex(request, keyname, strlen(keyname)+1, 0, zval_copy(IS_STRING, *param)); \
                if (obdc) { \
                        HTTP_CHECK_OPEN_BASEDIR(Z_STRVAL_P(copy), return FAILURE); \
                } \
                HTTP_CURL_OPT(optname, Z_STRVAL_P(copy)); \
-               key = NULL; \
                continue; \
        }
 #define HTTP_CURL_OPT_LONG(OPTION, ldiff) \
                HTTP_CURL_OPT_LONG_EX(K+lenof("CURLOPT_KEY")+ldiff, OPTION); \
        }
 #define HTTP_CURL_OPT_LONG_EX(keyname, optname) \
-       if (!strcasecmp(key, keyname)) { \
+       if (!strcasecmp(key.str, keyname)) { \
                zval *copy = zval_copy(IS_LONG, *param); \
                HTTP_CURL_OPT(optname, Z_LVAL_P(copy)); \
-               key = NULL; \
                zval_free(&copy); \
                continue; \
        }