fixed: incorrect handling of spaces in rest get method
diff --git a/modules/core/transport/http/http_request_line.c b/modules/core/transport/http/http_request_line.c
index 12ee3b7..1e0306a 100644
--- a/modules/core/transport/http/http_request_line.c
+++ b/modules/core/transport/http/http_request_line.c
@@ -203,7 +203,7 @@
}
*tmp++ = '\0';
uri = tmp;
- tmp = strchr(tmp, ' ');
+ tmp = strrchr(tmp, ' ');
if (NULL == tmp)
{
AXIS2_FREE(env->allocator, req_line);
diff --git a/modules/core/transport/http/http_worker.c b/modules/core/transport/http/http_worker.c
index 881890e..25479ac 100644
--- a/modules/core/transport/http/http_worker.c
+++ b/modules/core/transport/http/http_worker.c
@@ -174,7 +174,7 @@
axis2_char_t *url_external_form = NULL;
axis2_qname_t *tmp_qname = NULL;
axis2_char_t *svc_grp_uuid = NULL;
- axis2_char_t *path = NULL;
+ axis2_char_t *path = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, svr_conn, AXIS2_FAILURE);
@@ -249,15 +249,16 @@
axis2_http_worker_set_transport_out_config(http_worker, env, conf_ctx,
response);
}
+
svr_ip = AXIS2_SIMPLE_HTTP_SVR_CONN_GET_SVR_IP(svr_conn, env);
- path = AXIS2_HTTP_REQUEST_LINE_GET_URI(
- AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(
- simple_request, env), env);
+ path = AXIS2_HTTP_REQUEST_LINE_GET_URI(
+ AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(
+ simple_request, env), env);
request_url = axis2_url_create(env, "http", svr_ip,
- http_worker_impl->svr_port,
- path);
+ http_worker_impl->svr_port,
+ path);
url_external_form = AXIS2_URL_TO_EXTERNAL_FORM(request_url, env);
property = axis2_property_create(env);
diff --git a/samples/client/echo/echo.c b/samples/client/echo/echo.c
index ef76f7e..10f6da2 100644
--- a/samples/client/echo/echo.c
+++ b/samples/client/echo/echo.c
@@ -159,7 +159,7 @@
ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples", "ns1");
echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node);
text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node);
- AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, "echo5", text_om_node);
+ AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, "Hello World!", text_om_node);
om_str = AXIOM_NODE_TO_STRING(echo_om_node, env);
if (om_str)
diff --git a/samples/user_guide/clients/echo_util.c b/samples/user_guide/clients/echo_util.c
index 6ee9b86..5f55fda 100644
--- a/samples/user_guide/clients/echo_util.c
+++ b/samples/user_guide/clients/echo_util.c
@@ -30,7 +30,7 @@
ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples", "ns1");
echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node);
text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node);
- AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, "echo5", text_om_node);
+ AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, "Hello World!", text_om_node);
om_str = AXIOM_NODE_TO_STRING(echo_om_node, env);
if (om_str)