summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar nadiramra2010-06-01 20:09:28 +0000
committerGravatar nadiramra2010-06-01 20:09:28 +0000
commitaf93f3e81360d8283cf83eb22b9f3165e097774d (patch)
tree2d91128d6729d8ffc7dcc028fef4e795dcfb1506
parentf524a1720af5bacf807684d890afa85af4cbe5b7 (diff)
downloadaxis2c-af93f3e81360d8283cf83eb22b9f3165e097774d.tar.gz
axis2c-af93f3e81360d8283cf83eb22b9f3165e097774d.tar.bz2
Minor API name correction receive to receive. kept old api for backward compatibility but removed from header file.
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@950233 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/axis2_http_client.h2
-rw-r--r--src/core/transport/http/common/http_header.c2
-rw-r--r--src/core/transport/http/sender/http_client.c17
-rw-r--r--src/core/transport/http/sender/http_sender.c57
-rw-r--r--test/core/transport/http/test_http_transport.c6
5 files changed, 40 insertions, 44 deletions
diff --git a/include/axis2_http_client.h b/include/axis2_http_client.h
index 9e14a95..a7b2dbc 100644
--- a/include/axis2_http_client.h
+++ b/include/axis2_http_client.h
@@ -66,7 +66,7 @@ extern "C"
* @param env pointer to environment struct
*/
AXIS2_EXTERN int AXIS2_CALL
- axis2_http_client_recieve_header(
+ axis2_http_client_receive_header(
axis2_http_client_t * client,
const axutil_env_t * env);
diff --git a/src/core/transport/http/common/http_header.c b/src/core/transport/http/common/http_header.c
index 3ea2ffc..bd461e3 100644
--- a/src/core/transport/http/common/http_header.c
+++ b/src/core/transport/http/common/http_header.c
@@ -75,7 +75,7 @@ axis2_http_header_create_by_str(
*/
/*
* strdup is removed to increase the performance. This method is called from
- * axis2_simple_http_svr_conn_read_request and axis2_http_client_recieve_header and both of them
+ * axis2_simple_http_svr_conn_read_request and axis2_http_client_receive_header and both of them
* passes a temporary string. hence we can modify the contents without doing a strdup.
* Above code is commented after 1.6.0 . If no issue is found until 1.8.0, above can be removed
*/
diff --git a/src/core/transport/http/sender/http_client.c b/src/core/transport/http/sender/http_client.c
index e662581..f2d17b6 100644
--- a/src/core/transport/http/sender/http_client.c
+++ b/src/core/transport/http/sender/http_client.c
@@ -526,11 +526,20 @@ axis2_http_client_send(
return status;
}
+/* Following is deprecated and should be removed after 1.8 - spelling of API is not correct */
AXIS2_EXTERN int AXIS2_CALL
axis2_http_client_recieve_header(
axis2_http_client_t * client,
const axutil_env_t * env)
{
+ return axis2_http_client_receive_header(client, env);
+}
+
+AXIS2_EXTERN int AXIS2_CALL
+axis2_http_client_receive_header(
+ axis2_http_client_t * client,
+ const axutil_env_t * env)
+{
int status_code = -1;
axis2_http_status_line_t *status_line = NULL;
axis2_char_t str_status_line[512];
@@ -549,8 +558,7 @@ axis2_http_client_recieve_header(
port = axutil_url_get_port(client->url, env);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "client data stream null or socket error for host \
-%s and %d port", host, port);
+ "Client data stream null or socket error for host %s and %d port", host, port);
AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_HTTP_REQUEST_NOT_SENT, AXIS2_FAILURE);
return -1;
}
@@ -797,8 +805,7 @@ axis2_http_client_connect_ssl_host(
if(!tmp_stream)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "unable to create open socket for ssl host %s and %d \
-port", host, port);
+ "Unable to create socket for SSL host %s and %d port", host, port);
return AXIS2_FAILURE;
}
@@ -991,4 +998,4 @@ axis2_http_client_reset(
client->req_body = NULL;
}
return AXIS2_SUCCESS;
-} \ No newline at end of file
+}
diff --git a/src/core/transport/http/sender/http_sender.c b/src/core/transport/http/sender/http_sender.c
index 96e9da5..093cfec 100644
--- a/src/core/transport/http/sender/http_sender.c
+++ b/src/core/transport/http/sender/http_sender.c
@@ -1032,14 +1032,13 @@ axis2_http_sender_send(
if(auth_status != AXIS2_SUCCESS)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting HTTP Authentication header");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting HTTP authentication header");
}
http_auth_header_added = AXIS2_TRUE;
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
else if(force_http_auth_with_head)
@@ -1055,7 +1054,7 @@ axis2_http_sender_send(
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
axis2_http_simple_request_set_request_line(request, env, temp);
axis2_http_request_line_free(head_request_line, env);
@@ -1066,9 +1065,7 @@ axis2_http_sender_send(
if(auth_status != AXIS2_SUCCESS)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting HTTP Authentication\
- header");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting HTTP authentication header");
}
http_auth_header_added = AXIS2_TRUE;
}
@@ -1078,7 +1075,7 @@ axis2_http_sender_send(
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
{
@@ -1091,7 +1088,7 @@ axis2_http_sender_send(
{
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
}
@@ -1111,7 +1108,7 @@ axis2_http_sender_send(
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
axis2_http_simple_request_set_request_line(request, env, temp);
axis2_http_request_line_free(head_request_line, env);
@@ -1122,9 +1119,7 @@ axis2_http_sender_send(
if(auth_status != AXIS2_SUCCESS)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting Proxy Authentication\
- header");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting proxy authentication header");
}
if((force_http_auth_with_head || force_http_auth) && !http_auth_header_added)
@@ -1135,7 +1130,7 @@ axis2_http_sender_send(
{
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
}
else if(status_code != AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
@@ -1143,14 +1138,14 @@ axis2_http_sender_send(
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
/* Proxies have no idea about HTTP Methods therefore, if
* it fails no need to re-check */
if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy Authentication failed");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy authentication failed");
axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
}
@@ -1164,9 +1159,7 @@ axis2_http_sender_send(
if(auth_status != AXIS2_SUCCESS)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting Proxy Authentication \
-header");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting proxy authentication header");
}
if((force_http_auth_with_head || force_http_auth) && !http_auth_header_added)
@@ -1177,7 +1170,7 @@ header");
{
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
{
@@ -1215,7 +1208,7 @@ header");
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
axis2_http_simple_request_set_request_line(request, env, temp);
axis2_http_request_line_free(head_request_line, env);
@@ -1227,14 +1220,12 @@ header");
if(auth_status != AXIS2_SUCCESS)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting HTTP Authentication \
-header");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting HTTP authentication header");
}
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
{
axis2_status_t auth_status;
@@ -1244,13 +1235,12 @@ header");
if(auth_status != AXIS2_SUCCESS)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting HTTP \
-Authentication header");
+ "Error in setting HTTP authentication header");
}
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
}
@@ -1263,32 +1253,31 @@ Authentication header");
if(auth_status != AXIS2_SUCCESS)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Error in setting HTTP Authentication \
-header");
+ "Error in setting HTTP authentication header");
}
status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
- status_code = axis2_http_client_recieve_header(sender->client, env);
+ status_code = axis2_http_client_receive_header(sender->client, env);
}
if(AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP Authentication failed");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP authentication failed");
axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_TRUE);
}
if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy Authentication failed");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy authentication failed");
axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
}
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP Authentication failed");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP authentication failed");
axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_TRUE);
}
diff --git a/test/core/transport/http/test_http_transport.c b/test/core/transport/http/test_http_transport.c
index 69134bc..d961316 100644
--- a/test/core/transport/http/test_http_transport.c
+++ b/test/core/transport/http/test_http_transport.c
@@ -157,7 +157,7 @@ test_http_client(
status);
return;
}
- status = axis2_http_client_recieve_header(client, env);
+ status = axis2_http_client_receive_header(client, env);
if (status < 0)
{
printf("Test FAILED ......... Can't recieve. Status: %d\n", status);
@@ -229,10 +229,10 @@ test_https_client(
status);
return;
}
- status = axis2_http_client_recieve_header(client, env);
+ status = axis2_http_client_receive_header(client, env);
if (status < 0)
{
- printf("Test FAILED ......... Can't recieve. Status: %d\n", status);
+ printf("Test FAILED ......... Can't receive. Status: %d\n", status);
return;
}
response = axis2_http_client_get_response(client, env);