summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/transport/http/common/http_worker.c15
-rw-r--r--test/Makefile.am1
-rw-r--r--test/core/addr/Makefile.am2
-rw-r--r--test/core/clientapi/Makefile.am2
-rw-r--r--test/core/context/Makefile.am2
-rw-r--r--test/core/deployment/Makefile.am2
-rw-r--r--test/core/description/Makefile.am2
-rw-r--r--test/core/engine/Makefile.am2
-rw-r--r--test/core/transport/http/Makefile.am2
-rw-r--r--test/cutest/include/cut_defs.h (renamed from cutest/include/cut_defs.h)0
-rw-r--r--test/cutest/include/cut_http_server.h (renamed from cutest/include/cut_http_server.h)13
-rw-r--r--util/test/util/Makefile.am3
12 files changed, 34 insertions, 12 deletions
diff --git a/src/core/transport/http/common/http_worker.c b/src/core/transport/http/common/http_worker.c
index 8a8dfe6..353169c 100644
--- a/src/core/transport/http/common/http_worker.c
+++ b/src/core/transport/http/common/http_worker.c
@@ -242,12 +242,19 @@ axis2_http_worker_process_request(
axis2_char_t *session_id = NULL;
cookie_header_value = axis2_http_header_get_value(cookie_header, env);
- session_id = axis2_http_transport_utils_get_session_id_from_cookie(env,
+ if(cookie_header_value)
+ {
+ session_id = axis2_http_transport_utils_get_session_id_from_cookie(env,
cookie_header_value);
- if(session_id)
- session_str = env->get_session_fn((void *) conf_ctx, session_id);
+ }
+ if(session_id && env->get_session_fn)
+ {
+ session_str = env->get_session_fn((void *) conf_ctx, session_id);
+ }
if(session_str)
- axis2_http_transport_utils_set_session(env, msg_ctx, session_str);
+ {
+ axis2_http_transport_utils_set_session(env, msg_ctx, session_str);
+ }
}
/*connection_header = axis2_http_simple_request_get_first_header(simple_request, env,
diff --git a/test/Makefile.am b/test/Makefile.am
index c95f314..dd33c5c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,2 +1,3 @@
TESTS =
SUBDIRS = core
+noinst_HEADERS = cutest/include/cut_defs.h cutest/include/cut_http_server.h
diff --git a/test/core/addr/Makefile.am b/test/core/addr/Makefile.am
index a04ad8d..ecad60c 100644
--- a/test/core/addr/Makefile.am
+++ b/test/core/addr/Makefile.am
@@ -18,5 +18,5 @@ INCLUDES = -I$(CUTEST_HOME)/include \
-I$(top_builddir)/include \
-I ../../../util/include \
-I ../../../axiom/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/clientapi/Makefile.am b/test/core/clientapi/Makefile.am
index 00ab2c4..52559ff 100644
--- a/test/core/clientapi/Makefile.am
+++ b/test/core/clientapi/Makefile.am
@@ -49,5 +49,5 @@ INCLUDES = -I$(CUTEST_HOME)/include \
-I ../../../util/include \
-I ../../../neethi/include \
-I ../../../axiom/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/context/Makefile.am b/test/core/context/Makefile.am
index b205f3f..e7e8bb0 100644
--- a/test/core/context/Makefile.am
+++ b/test/core/context/Makefile.am
@@ -19,4 +19,4 @@ INCLUDES = -I$(CUTEST_HOME)/include \
-I$(top_builddir)/src/core/description \
-I ../../../util/include \
-I ../../../axiom/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/deployment/Makefile.am b/test/core/deployment/Makefile.am
index 539ea0f..0371fdb 100644
--- a/test/core/deployment/Makefile.am
+++ b/test/core/deployment/Makefile.am
@@ -24,4 +24,4 @@ INCLUDES = -I ../../../include \
-I ../../../util/include \
-I ../../../axiom/include \
-I ../../../neethi/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/description/Makefile.am b/test/core/description/Makefile.am
index 2ac48ed..de8aded 100644
--- a/test/core/description/Makefile.am
+++ b/test/core/description/Makefile.am
@@ -23,5 +23,5 @@ INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/clientapi \
-I ../../../util/include \
-I ../../../axiom/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/engine/Makefile.am b/test/core/engine/Makefile.am
index 9b2a70a..bfec146 100644
--- a/test/core/engine/Makefile.am
+++ b/test/core/engine/Makefile.am
@@ -23,5 +23,5 @@ INCLUDES = -I$(top_builddir)/src/xml/guththila \
-I ../../../util/include \
-I ../../../axiom/include \
-I ../../../neethi/include \
- -I ../../../cutest/include
+ -I ../../cutest/include
diff --git a/test/core/transport/http/Makefile.am b/test/core/transport/http/Makefile.am
index 703cd5c..1ce55ea 100644
--- a/test/core/transport/http/Makefile.am
+++ b/test/core/transport/http/Makefile.am
@@ -19,5 +19,5 @@ INCLUDES = -I$(CUTEST_HOME)/include \
-I$(top_builddir)/include \
-I ../../../../util/include \
-I ../../../../axiom/include \
- -I ../../../../cutest/include
+ -I ../../../cutest/include
diff --git a/cutest/include/cut_defs.h b/test/cutest/include/cut_defs.h
index bd9a071..bd9a071 100644
--- a/cutest/include/cut_defs.h
+++ b/test/cutest/include/cut_defs.h
diff --git a/cutest/include/cut_http_server.h b/test/cutest/include/cut_http_server.h
index 7f9d4c7..e386750 100644
--- a/cutest/include/cut_http_server.h
+++ b/test/cutest/include/cut_http_server.h
@@ -15,6 +15,9 @@
* limitations under the License.
*/
+#ifndef CUT_HTTP_SERVER_H
+#define CUT_HTTP_SERVER_H
+
#include <axis2_http_server.h>
#include <axis2_http_transport.h>
#include <platforms/axutil_platform_auto_sense.h>
@@ -28,6 +31,11 @@
#include <axutil_file_handler.h>
#include <axis2_const.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
axutil_env_t *system_env = NULL;
axutil_thread_t *td_http_server = NULL;
axis2_transport_receiver_t *server = NULL;
@@ -200,3 +208,8 @@ static void ut_stop_http_server(axutil_env_t *env)
rv = axutil_thread_exit(thread_http_server, env->allocator);
thread_http_server = NULL;
}
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* CUT_HTTP_SERVER_H */
diff --git a/util/test/util/Makefile.am b/util/test/util/Makefile.am
index 079e1f5..38c04df 100644
--- a/util/test/util/Makefile.am
+++ b/util/test/util/Makefile.am
@@ -15,4 +15,5 @@ test_thread_LDADD = $(top_builddir)/src/libaxutil.la
INCLUDES = -I$(top_builddir)/include \
-I$(CUTEST_HOME)/include \
- -I ../../../cutest/include
+ -I ../../../test/cutest/include
+EXTRA_DIST = test_string.c