/* 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;
}
-
+*/
#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"
/*
* Creates an apache table* of cookie name / value pairs
*/
+/*
apr_table_t* apacheParseCookies(request_rec *r);
+*/
#endif
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);
} 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",