-/* {{{ static inline char *http_curl_getinfoname(CURLINFO) */
-static inline char *_http_curl_getinfoname(CURLINFO i TSRMLS_DC)
-{
-#define CASE(I) case CURLINFO_ ##I : { return pretty_key(http_curl_copystr(#I), sizeof(#I)-1, 0, 0); }
- switch (i)
- {
- /* CURLINFO_EFFECTIVE_URL = CURLINFO_STRING +1, */
- CASE(EFFECTIVE_URL);
- /* CURLINFO_RESPONSE_CODE = CURLINFO_LONG +2, */
-#if LIBCURL_VERSION_NUM > 0x070a06
- CASE(RESPONSE_CODE);
-#else
- CASE(HTTP_CODE);
-#endif
- /* CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE +3, */
- CASE(TOTAL_TIME);
- /* CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE +4, */
- CASE(NAMELOOKUP_TIME);
- /* CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE +5, */
- CASE(CONNECT_TIME);
- /* CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE +6, */
- CASE(PRETRANSFER_TIME);
- /* CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE +7, */
- CASE(SIZE_UPLOAD);
- /* CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE +8, */
- CASE(SIZE_DOWNLOAD);
- /* CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE +9, */
- CASE(SPEED_DOWNLOAD);
- /* CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE +10, */
- CASE(SPEED_UPLOAD);
- /* CURLINFO_HEADER_SIZE = CURLINFO_LONG +11, */
- CASE(HEADER_SIZE);
- /* CURLINFO_REQUEST_SIZE = CURLINFO_LONG +12, */
- CASE(REQUEST_SIZE);
- /* CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG +13, */
- CASE(SSL_VERIFYRESULT);
- /* CURLINFO_FILETIME = CURLINFO_LONG +14, */
- CASE(FILETIME);
- /* CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE +15, */
- CASE(CONTENT_LENGTH_DOWNLOAD);
- /* CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE +16, */
- CASE(CONTENT_LENGTH_UPLOAD);
- /* CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE +17, */
- CASE(STARTTRANSFER_TIME);
- /* CURLINFO_CONTENT_TYPE = CURLINFO_STRING +18, */
- CASE(CONTENT_TYPE);
- /* CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE +19, */
- CASE(REDIRECT_TIME);
- /* CURLINFO_REDIRECT_COUNT = CURLINFO_LONG +20, */
- CASE(REDIRECT_COUNT);
- /* CURLINFO_PRIVATE = CURLINFO_STRING +21, * (mike) /
- CASE(PRIVATE);
- /* CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG +22, */
- CASE(HTTP_CONNECTCODE);
-#if LIBCURL_VERSION_NUM > 0x070a07
- /* CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG +23, */
- CASE(HTTPAUTH_AVAIL);
- /* CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG +24, */
- CASE(PROXYAUTH_AVAIL);
-#endif