From: erickson Date: Tue, 20 Jun 2006 11:45:31 +0000 (+0000) Subject: removed some unused non-apache2.2 friendly code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d4908a1e53e42ca5104a42662babb27be137b85;p=opensrf%2Fbjwebb.git removed some unused non-apache2.2 friendly code git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@738 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/apachetools.c b/src/gateway/apachetools.c index f975d62..d70bfe6 100644 --- a/src/gateway/apachetools.c +++ b/src/gateway/apachetools.c @@ -176,29 +176,31 @@ int apacheError( char* msg, ... ) { /* taken more or less directly from O'Reillly - Writing Apache Modules in Perl and C */ +/* needs updating... + apr_table_t* apacheParseCookies(request_rec *r) { - const char *data = ap_table_get(r->headers_in, "Cookie"); + const char *data = apr_table_get(r->headers_in, "Cookie"); osrfLogDebug(OSRF_LOG_MARK, "Loaded cookies: %s", data); apr_table_t* cookies; const char *pair; if(!data) return NULL; - cookies = ap_make_table(r->pool, 4); + cookies = apr_make_table(r->pool, 4); while(*data && (pair = ap_getword(r->pool, &data, ';'))) { const char *name, *value; if(*data == ' ') ++data; name = ap_getword(r->pool, &pair, '='); while(*pair && (value = ap_getword(r->pool, &pair, '&'))) { ap_unescape_url((char *)value); - ap_table_add(cookies, name, value); + apr_table_add(cookies, name, value); } } return cookies; } - +*/ diff --git a/src/gateway/apachetools.h b/src/gateway/apachetools.h index d034b40..3f20c4f 100644 --- a/src/gateway/apachetools.h +++ b/src/gateway/apachetools.h @@ -2,7 +2,7 @@ #include "http_config.h" #include "http_core.h" #include "http_protocol.h" -#include "apr_compat.h" +//#include "apr_compat.h" #include "apr_strings.h" #include "apr_reslist.h" #include "http_log.h" @@ -49,7 +49,9 @@ int apacheError( char* msg, ... ); /* * Creates an apache table* of cookie name / value pairs */ +/* apr_table_t* apacheParseCookies(request_rec *r); +*/ #endif diff --git a/src/gateway/osrf_json_gateway.c b/src/gateway/osrf_json_gateway.c index b4b1bd5..6de37c9 100644 --- a/src/gateway/osrf_json_gateway.c +++ b/src/gateway/osrf_json_gateway.c @@ -108,7 +108,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) { char* a_l = NULL; /* request api level */ int isXML = 0; int api_level = 1; - apr_table_t* cookies = NULL; + //apr_table_t* cookies = NULL; r->allowed |= (AP_METHOD_BIT << M_GET); r->allowed |= (AP_METHOD_BIT << M_POST); @@ -143,10 +143,12 @@ static int osrf_json_gateway_method_handler (request_rec *r) { } else { + /* if( 0 && (cookies = apacheParseCookies(r)) ) { const char* authtoken = apr_table_get(cookies, "ses"); osrfLogInfo(OSRF_LOG_MARK, "SESSION = %s", authtoken); } + */ osrfLogInfo( OSRF_LOG_MARK, "[%s] service=%s, method=%s",