axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r950233 - in /axis/axis2/c/core/trunk: include/ src/core/transport/http/common/ src/core/transport/http/sender/ test/core/transport/http/
Date Tue, 01 Jun 2010 20:09:28 GMT
Author: nadiramra
Date: Tue Jun  1 20:09:28 2010
New Revision: 950233

URL: http://svn.apache.org/viewvc?rev=950233&view=rev
Log:
Minor API name correction receive to receive. kept old api for backward compatibility but
removed from header file.

Modified:
    axis/axis2/c/core/trunk/include/axis2_http_client.h
    axis/axis2/c/core/trunk/src/core/transport/http/common/http_header.c
    axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c
    axis/axis2/c/core/trunk/src/core/transport/http/sender/http_sender.c
    axis/axis2/c/core/trunk/test/core/transport/http/test_http_transport.c

Modified: axis/axis2/c/core/trunk/include/axis2_http_client.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/include/axis2_http_client.h?rev=950233&r1=950232&r2=950233&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/include/axis2_http_client.h (original)
+++ axis/axis2/c/core/trunk/include/axis2_http_client.h Tue Jun  1 20:09:28 2010
@@ -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);
 

Modified: axis/axis2/c/core/trunk/src/core/transport/http/common/http_header.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/common/http_header.c?rev=950233&r1=950232&r2=950233&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/common/http_header.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/common/http_header.c Tue Jun  1 20:09:28
2010
@@ -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
      */

Modified: axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c?rev=950233&r1=950232&r2=950233&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c Tue Jun  1 20:09:28
2010
@@ -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
+}

Modified: axis/axis2/c/core/trunk/src/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/sender/http_sender.c?rev=950233&r1=950232&r2=950233&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/sender/http_sender.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/sender/http_sender.c Tue Jun  1 20:09:28
2010
@@ -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);
         }

Modified: axis/axis2/c/core/trunk/test/core/transport/http/test_http_transport.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/test/core/transport/http/test_http_transport.c?rev=950233&r1=950232&r2=950233&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/test/core/transport/http/test_http_transport.c (original)
+++ axis/axis2/c/core/trunk/test/core/transport/http/test_http_transport.c Tue Jun  1 20:09:28
2010
@@ -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);



Mime
View raw message