From: Michael Wallner Date: Fri, 26 Aug 2005 09:22:59 +0000 (+0000) Subject: - add http_log() for cases we don't want to exit X-Git-Tag: RELEASE_0_12_0~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b46d0197c4402e76c2608ba972e1d05db22a321a;p=m6w6%2Fext-http - add http_log() for cases we don't want to exit - remove clunky auth hooks completely --- diff --git a/Makefile.frag b/Makefile.frag index 773c9fa..24a9e76 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -14,7 +14,6 @@ HTTP_HEADER_FILES= \ php_http_date_api.h \ php_http_message_object.h \ php_http_std_defs.h \ - php_http_auth_api.h \ php_http_exception_object.h \ php_http_request_object.h \ php_http_requestpool_object.h \ diff --git a/config.m4 b/config.m4 index 25570f4..32e288b 100644 --- a/config.m4 +++ b/config.m4 @@ -94,7 +94,7 @@ dnl ---- PHP_HTTP_SOURCES="missing.c http.c http_functions.c phpstr/phpstr.c \ http_util_object.c http_message_object.c http_request_object.c http_request_pool_api.c \ http_response_object.c http_exception_object.c http_requestpool_object.c \ - http_api.c http_auth_api.c http_cache_api.c http_request_api.c http_date_api.c \ + http_api.c http_cache_api.c http_request_api.c http_date_api.c \ http_headers_api.c http_message_api.c http_send_api.c http_url_api.c \ http_info_api.c" PHP_NEW_EXTENSION([http], $PHP_HTTP_SOURCES, [$ext_shared]) diff --git a/config.w32 b/config.w32 index abb1eb5..1c8b589 100644 --- a/config.w32 +++ b/config.w32 @@ -19,7 +19,7 @@ if (PHP_HTTP != "no") { "missing.c http.c http_functions.c http_exception_object.c "+ "http_util_object.c http_message_object.c http_requestpool_object.c "+ "http_request_object.c http_response_object.c "+ - "http_api.c http_auth_api.c http_cache_api.c http_request_pool_api.c "+ + "http_api.c http_cache_api.c http_request_pool_api.c "+ "http_request_api.c http_date_api.c http_headers_api.c "+ "http_message_api.c http_send_api.c http_url_api.c "+ "http_info_api.c", diff --git a/http.c b/http.c index 2cd8711..599cc7e 100644 --- a/http.c +++ b/http.c @@ -102,8 +102,6 @@ function_entry http_functions[] = { PHP_FE(http_request_method_exists, NULL) PHP_FE(http_request_method_name, NULL) #endif - PHP_FE(http_auth_basic, NULL) - PHP_FE(http_auth_basic_cb, NULL) #ifndef ZEND_ENGINE_2 PHP_FE(http_build_query, NULL) #endif diff --git a/http.dsp b/http.dsp index b41373e..bf39787 100644 --- a/http.dsp +++ b/http.dsp @@ -110,10 +110,6 @@ SOURCE=.\http_functions.c # End Source File # Begin Source File -SOURCE=.\http_auth_api.c -# End Source File -# Begin Source File - SOURCE=.\http_cache_api.c # End Source File # Begin Source File @@ -162,10 +158,6 @@ SOURCE=.\php_http_request_api.h # End Source File # Begin Source File -SOURCE=.\php_http_auth_api.h -# End Source File -# Begin Source File - SOURCE=.\php_http_cache_api.h # End Source File # Begin Source File diff --git a/http_api.c b/http_api.c index e12e1eb..b36a32d 100644 --- a/http_api.c +++ b/http_api.c @@ -179,53 +179,60 @@ void _http_error_ex(long type, long code, const char *format, ...) } /* }}} */ -/* {{{ STATUS http_exit(int, char*, char*, zend_bool) */ -STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header TSRMLS_DC) +/* {{{ void http_log(char *, char *, char *) */ +void _http_log_ex(char *file, const char *ident, const char *message TSRMLS_DC) { + time_t now; + struct tm nowtm; char datetime[128]; - if (SUCCESS != http_send_status_header(status, send_header ? header : NULL)) { - http_error_ex(HE_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, header ? header : ""); - STR_FREE(header); - STR_FREE(body); - return FAILURE; - } - if (body) { - PHPWRITE(body, strlen(body)); - } - { - time_t now; - struct tm nowtm; - - time(&now); - strftime(datetime, sizeof(datetime), "%Y-%m-%d %H:%M:%S", php_localtime_r(&now, &nowtm)); - } - -#define HTTP_LOG_WRITE(for, type, header) \ - HTTP_LOG_WRITE_EX(for, type, header); \ - HTTP_LOG_WRITE_EX(composite, type, header); + time(&now); + strftime(datetime, sizeof(datetime), "%Y-%m-%d %H:%M:%S", php_localtime_r(&now, &nowtm)); -#define HTTP_LOG_WRITE_EX(for, type, header) \ - if (HTTP_G(log).for && strlen(HTTP_G(log).for)) { \ - php_stream *log = php_stream_open_wrapper(HTTP_G(log).for, "ab", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); \ +#define HTTP_LOG_WRITE(file, type, msg) \ + if (file && strlen(file)) { \ + php_stream *log = php_stream_open_wrapper(file, "ab", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); \ \ if (log) { \ - php_stream_printf(log TSRMLS_CC, "%s [%12s] %32s <%s>%s", datetime, type, header, SG(request_info).request_uri, PHP_EOL); \ + php_stream_printf(log TSRMLS_CC, "%s [%12s] %32s <%s>%s", datetime, type, msg, SG(request_info).request_uri, PHP_EOL); \ php_stream_close(log); \ } \ \ } + + HTTP_LOG_WRITE(file, ident, message); + HTTP_LOG_WRITE(HTTP_G(log).composite, ident, message); +} +/* }}} */ + +/* {{{ STATUS http_exit(int, char*, char*) */ +STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header TSRMLS_DC) +{ + if (status || send_header) { + if (SUCCESS != http_send_status_header(status, send_header ? header : NULL)) { + http_error_ex(HE_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, header ? header : ""); + STR_FREE(header); + STR_FREE(body); + return FAILURE; + } + } + + if (body) { + PHPWRITE(body, strlen(body)); + } + switch (status) { - case 301: HTTP_LOG_WRITE(redirect, "301-REDIRECT", header); break; - case 302: HTTP_LOG_WRITE(redirect, "302-REDIRECT", header); break; - case 304: HTTP_LOG_WRITE(cache, "304-CACHE", header); break; - case 401: HTTP_LOG_WRITE(auth, "401-AUTH", header); break; - case 403: HTTP_LOG_WRITE(auth, "403-AUTH", header); break; - case 405: HTTP_LOG_WRITE(allowed_methods, "405-ALLOWED", header); break; + case 301: http_log(HTTP_G(log).redirect, "301-REDIRECT", header); break; + case 302: http_log(HTTP_G(log).redirect, "302-REDIRECT", header); break; + case 304: http_log(HTTP_G(log).cache, "304-CACHE", header); break; + case 405: http_log(HTTP_G(log).allowed_methods, "405-ALLOWED", header); break; + default: http_log(NULL, header, body); break; } + STR_FREE(header); STR_FREE(body); + zend_bailout(); /* fake */ return SUCCESS; diff --git a/http_auth_api.c b/http_auth_api.c deleted file mode 100644 index 5e5bafc..0000000 --- a/http_auth_api.c +++ /dev/null @@ -1,257 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ -*/ - -/* $Id$ */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include "php.h" - -#include "SAPI.h" -#include "ext/standard/base64.h" - -#include "php_http.h" -#include "php_http_api.h" -#include "php_http_std_defs.h" -#include "php_http_send_api.h" - -/* - * TODO: - * - Digest Auth - */ - -/* {{{ STATUS http_auth_basic_header(char*) */ -PHP_HTTP_API STATUS _http_auth_basic_header(const char *realm TSRMLS_DC) -{ - char realm_header[1024] = {0}; - snprintf(realm_header, 1023, "WWW-Authenticate: Basic realm=\"%s\"", realm); - return http_send_status_header(401, realm_header); -} -/* }}} */ - -/* {{{ STATUS http_auth_credentials(char **, char **) */ -PHP_HTTP_API STATUS _http_auth_basic_credentials(char **user, char **pass TSRMLS_DC) -{ - if (strncmp(sapi_module.name, "isapi", 5)) { - zval *zuser, *zpass; - - HTTP_GSC(zuser, "PHP_AUTH_USER", FAILURE); - HTTP_GSC(zpass, "PHP_AUTH_PW", FAILURE); - - *user = estrndup(Z_STRVAL_P(zuser), Z_STRLEN_P(zuser)); - *pass = estrndup(Z_STRVAL_P(zpass), Z_STRLEN_P(zpass)); - - return SUCCESS; - } else { - zval *zauth = NULL; - HTTP_GSC(zauth, "HTTP_AUTHORIZATION", FAILURE); - { - int decoded_len; - char *colon, *decoded = (char *) php_base64_decode((const unsigned char *) Z_STRVAL_P(zauth), Z_STRLEN_P(zauth), &decoded_len); - - if (colon = strchr(decoded + 6, ':')) { - *user = estrndup(decoded + 6, colon - decoded - 6); - *pass = estrndup(colon + 1, decoded + decoded_len - colon - 6 - 1); - - return SUCCESS; - } else { - return FAILURE; - } - } - } -} -/* }}} */ - - -/* {{{ Digest * / - -#include "ext/standard/php_rand.h" -#include "ext/standard/md5.h" - -#define DIGEST_ALGORITHM "MD5" -#define DIGEST_SECRETLEN 20 -static unsigned char digest_secret[DIGEST_SECRETLEN]; - -#define DIGEST_BIN_LEN 16 -typedef char http_digest_bin_t[DIGEST_BIN_LEN]; -#define DIGEST_HEX_LEN 32 -typedef char http_digest_hex_t[DIGEST_HEX_LEN+1]; - -void _http_auth_global_init(TSRMLS_D) -{ - int i; - // XX this is pretty loose - for (i = 0; i < DIGEST_SECRETLEN; ++i) { - digest_secret[i] = (unsigned char) ((php_rand(TSRMLS_C) % 254) + 1); - } -} - -static void http_digest_line_decoder(const char *encoded, size_t encoded_len, char **decoded, size_t *decoded_len TSRMLS_DC) -{ - char l = '\0'; - size_t i; - phpstr s; - - phpstr_init_ex(&s, encoded_len, 1); - - for (i = 0; i < encoded_len; ++i) { - if ((encoded[i] != '\\') && (encoded[i] != '"')) { - phpstr_append(&s, encoded+i, 1); - } - } - - phpstr_fix(&s); - - *decoded = PHPSTR_VAL(&s); - *decoded_len = PHPSTR_LEN(&s); -} - -static void http_digest_tohex(http_digest_bin_t bin, http_digest_hex_t hex) -{ - unsigned short i; - unsigned char j; - - for (i = 0; i < DIGEST_BIN_LEN; i++) { - j = (bin[i] >> 4) & 0xf; - if (j <= 9) { - hex[i*2] = (j + '0'); - } else { - hex[i*2] = (j + 'a' - 10); - } - j = bin[i] & 0xf; - if (j <= 9) { - hex[i*2+1] = (j + '0'); - } else { - hex[i*2+1] = (j + 'a' - 10); - } - } - hex[DIGEST_HEX_LEN] = '\0'; -} - -static void http_digest_calc_HA1( - const char *alg, const char *user, - const char *realm, const char *pass, - const char *nonce, const char *cnonce, - http_digest_hex_t HA1) -{ - PHP_MD5_CTX md5; - http_digest_bin_t HA1_bin; - - PHP_MD5Init(&md5); - PHP_MD5Update(&md5, user, strlen(user)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, realm, strlen(realm)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, pass, strlen(pass)); - PHP_MD5Final(HA1_bin, &md5); - - if (strcasecmp(alg, "md5-sess") == 0) { - PHP_MD5Init(&md5); - PHP_MD5Update(&md5, HA1_bin, DIGEST_BIN_LEN); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, nonce, strlen(nonce)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, cnonce, strlen(cnonce)); - PHP_MD5Final(HA1_bin, &md5); - } - http_digest_tohex(HA1_bin, HA1); -} - -static void http_digest_calc_response( - const http_digest_hex_t HA1, - const char *nonce, const char *noncecount, - const char *cnonce, const char *qop, - const char *method, const char *uri, - http_digest_hex_t ent, - http_digest_hex_t response) -{ - PHP_MD5_CTX md5; - http_digest_bin_t HA2; - http_digest_bin_t bin; - http_digest_hex_t HA2_hex; - - // calculate H(A2) - PHP_MD5Init(&md5); - PHP_MD5Update(&md5, method, strlen(method)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, uri, strlen(uri)); - if (strcasecmp(qop, "auth-int") == 0) { - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, HEntity, DIGEST_HEX_LEN); - } - PHP_MD5Final(HA2, &md5); - http_digest_tohex(HA2, HA2_hex); - - // calculate response - PHP_MD5Init(&md5); - PHP_MD5Update(&md5, HA1, DIGEST_HEX_LEN); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, nonce, strlen(nonce)); - PHP_MD5Update(&md5, ":", 1); - if (*qop) { - PHP_MD5Update(&md5, noncecount, strlen(noncecount)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, cnonce, strlen(cnonce)); - PHP_MD5Update(&md5, ":", 1); - PHP_MD5Update(&md5, qop, strlen(qop)); - PHP_MD5Update(&md5, ":", 1); - } - PHP_MD5Update(&md5, HA2_hex, DIGEST_HEX_LEN); - PHP_MD5Final(bin, &md5); - http_digest_tohex(bin, response); -} - -PHP_HTTP_API STATUS _http_auth_digest_credentials(HashTable *items TSRMLS_DC) -{ - char *auth; - zval array, *zauth = NULL; - - HTTP_GSC(zauth, "HTTP_AUTHORIZATION", FAILURE); - auth = Z_STRVAL_P(zauth); - - if (strncasecmp(auth, "Digest ", sizeof("Digest")) || (!(auth += sizeof("Digest")))) { - return FAILURE; - } - if (SUCCESS != http_parse_key_list(auth, items, ',', http_digest_line_decoder, 0)) { - return FAILURE; - } - if ( !zend_hash_exists(items, "uri", sizeof("uri")) || - !zend_hash_exists(items, "realm", sizeof("realm")) || - !zend_hash_exists(items, "nonce", sizeof("nonce")) || - !zend_hash_exists(items, "username", sizeof("username")) || - !zend_hash_exists(items, "response", sizeof("response"))) { - zend_hash_clean(items); - return FAILURE; - } - return SUCCESS; -} - -PHP_HTTP_API STATUS _http_auth_digest_header(const char *realm TSRMLS_DC) -{ - return FAILURE; -} -/* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ - diff --git a/http_functions.c b/http_functions.c index a6542c2..28d9be5 100644 --- a/http_functions.c +++ b/http_functions.c @@ -31,7 +31,6 @@ #include "php_http.h" #include "php_http_std_defs.h" #include "php_http_api.h" -#include "php_http_auth_api.h" #include "php_http_request_api.h" #include "php_http_cache_api.h" #include "php_http_request_api.h" @@ -1156,116 +1155,6 @@ PHP_FUNCTION(http_request_method_name) #endif /* }}} HAVE_CURL */ - -/* {{{ proto bool http_auth_basic(string user, string pass[, string realm = "Restricted"]) - * - * Example: - *
- * Authorization failed!');
- * }
- * ?>
- * 
- */ -PHP_FUNCTION(http_auth_basic) -{ - char *realm = NULL, *user, *pass, *suser, *spass; - int r_len, u_len, p_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s", &user, &u_len, &pass, &p_len, &realm, &r_len) != SUCCESS) { - RETURN_FALSE; - } - - if (!realm) { - realm = "Restricted"; - } - - if (SUCCESS != http_auth_basic_credentials(&suser, &spass)) { - http_auth_basic_header(realm); - RETURN_FALSE; - } - - if (strcasecmp(suser, user)) { - http_auth_basic_header(realm); - RETURN_FALSE; - } - - if (strcmp(spass, pass)) { - http_auth_basic_header(realm); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool http_auth_basic_cb(mixed callback[, string realm = "Restricted"]) - * - * Example: - *
- * quoteSmart($user);
- *     if (strlen($realpass = $db->getOne($query)) {
- *         return $pass === $realpass;
- *     }
- *     return false;
- * }
- * if (!http_auth_basic_cb('auth_cb')) {
- *     die('

Authorization failed

'); - * } - * ?> - *
- */ -PHP_FUNCTION(http_auth_basic_cb) -{ - zval *cb; - char *realm = NULL, *user, *pass; - int r_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|s", &cb, &realm, &r_len) != SUCCESS) { - RETURN_FALSE; - } - - if (!realm) { - realm = "Restricted"; - } - - if (SUCCESS != http_auth_basic_credentials(&user, &pass)) { - http_auth_basic_header(realm); - RETURN_FALSE; - } - { - zval *zparams[2] = {NULL, NULL}, retval; - int result = 0; - - MAKE_STD_ZVAL(zparams[0]); - MAKE_STD_ZVAL(zparams[1]); - ZVAL_STRING(zparams[0], user, 0); - ZVAL_STRING(zparams[1], pass, 0); - - if (SUCCESS == call_user_function(EG(function_table), NULL, cb, - &retval, 2, zparams TSRMLS_CC)) { - result = Z_LVAL(retval); - } - - efree(user); - efree(pass); - efree(zparams[0]); - efree(zparams[1]); - - if (!result) { - http_auth_basic_header(realm); - } - - RETURN_BOOL(result); - } -} -/* }}}*/ - /* {{{ Sara Golemons http_build_query() */ #ifndef ZEND_ENGINE_2 diff --git a/http_util_object.c b/http_util_object.c index 5f4d438..6785d59 100644 --- a/http_util_object.c +++ b/http_util_object.c @@ -81,17 +81,6 @@ HTTP_BEGIN_ARGS(parseHeaders, 1) HTTP_ARG_VAL(headers_string, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(authBasic, 2) - HTTP_ARG_VAL(username, 0) - HTTP_ARG_VAL(password, 0) - HTTP_ARG_VAL(realm, 0) -HTTP_END_ARGS; - -HTTP_BEGIN_ARGS(authBasicCallback, 1) - HTTP_ARG_VAL(callback, 0) - HTTP_ARG_VAL(realm, 0) -HTTP_END_ARGS; - zend_class_entry *http_util_object_ce; zend_function_entry http_util_object_fe[] = { HTTP_UTIL_ALIAS(date, http_date) @@ -104,8 +93,6 @@ zend_function_entry http_util_object_fe[] = { HTTP_UTIL_ALIAS(chunkedDecode, http_chunked_decode) HTTP_UTIL_ALIAS(parseMessage, http_parse_message) HTTP_UTIL_ALIAS(parseHeaders, http_parse_headers) - HTTP_UTIL_ALIAS(authBasic, http_auth_basic) - HTTP_UTIL_ALIAS(authBasicCallback, http_auth_basic_cb) {NULL, NULL, NULL} }; diff --git a/package.xml b/package.xml index 3517095..7050c4d 100644 --- a/package.xml +++ b/package.xml @@ -1,6 +1,6 @@ - + pecl_http Extended HTTP support @@ -15,7 +15,6 @@ * Sending data/files/streams with (multiple) ranges support * Negotiating user preferred language/charset * Convenient request functions built upon libcurl -* HTTP auth hooks (Basic) * PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, HttpMessage ]]> @@ -45,6 +44,7 @@ + Added ZendEngine workaround for internal class' static properties (HttpResponse) - Removed http_split_response() +- Removed AuthBasic hooks - Removed HttpResponse::sendHeader(), HttpResponse::sendStatus() - Removed HttpRequest::unset*() methods, now handled through set*() with empty parameter @@ -80,7 +80,6 @@ php_http.h php_http_std_defs.h php_http_api.h - php_http_auth_api.h php_http_cache_api.h php_http_date_api.h php_http_headers_api.h @@ -100,7 +99,6 @@ http.c http_functions.c http_api.c - http_auth_api.c http_cache_api.c http_date_api.c http_headers_api.c diff --git a/php_http_api.h b/php_http_api.h index 25d305c..666c33b 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -35,6 +35,9 @@ extern STATUS _http_parse_key_list(const char *list, HashTable *items, char sepa #define http_error_ex _http_error_ex extern void _http_error_ex(long type, long code, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); +#define http_log(f, i, m) _http_log_ex((f), (i), (m) TSRMLS_CC) +extern void http_log_ex(char *file, const char *ident, const char *message TSRMLS_DC); + #define http_exit(s, h) http_exit_ex((s), (h), NULL, 1) #define http_exit_ex(s, h, b, e) _http_exit_ex((s), (h), (b), (e) TSRMLS_CC) extern STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header TSRMLS_DC); diff --git a/php_http_auth_api.h b/php_http_auth_api.h deleted file mode 100644 index 62ffd3e..0000000 --- a/php_http_auth_api.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ -*/ - -/* $Id$ */ - -#ifndef PHP_HTTP_AUTH_API_H -#define PHP_HTTP_AUTH_API_H - -#include "php_http_std_defs.h" - -#define http_auth_basic_credentials(u, p) _http_auth_basic_credentials((u), (p) TSRMLS_CC) -PHP_HTTP_API STATUS _http_auth_basic_credentials(char **user, char **pass TSRMLS_DC); - -#define http_auth_basic_header(r) _http_auth_basic_header((r) TSRMLS_CC) -PHP_HTTP_API STATUS _http_auth_basic_header(const char *realm TSRMLS_DC); - -/* -#define http_auth_digest_credentials(i) _http_auth_digest_credentials((i) TSRMLS_CC) -PHP_HTTP_API STATUS _http_auth_digest_credentials(HashTable *items TSRMLS_DC); - -#define http_auth_digest_header(r) _http_auth_digest_header((r) TSRMLS_CC) -PHP_HTTP_API STATUS _http_auth_digest_header(const char *realm TSRMLS_DC); -*/ - -#endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ - diff --git a/php_http_util_object.h b/php_http_util_object.h index 7357287..d50850e 100644 --- a/php_http_util_object.h +++ b/php_http_util_object.h @@ -33,9 +33,7 @@ PHP_METHOD(HttpUtil, matchModified); PHP_METHOD(HttpUtil, matchEtag); PHP_METHOD(HttpUtil, chunkedDecode); PHP_METHOD(HttpUtil, parseHeaders); -PHP_METHOD(HttpUril, parseMessage); -PHP_METHOD(HttpUtil, authBasic); -PHP_METHOD(HttpUtil, authBasicCallback); +PHP_METHOD(HttpUtil, parseMessage); #endif #endif