axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r436731 - in /webservices/axis2/trunk/c: include/axis2_http_client.h modules/core/transport/http/sender/http_client.c
Date Fri, 25 Aug 2006 09:16:01 GMT
Author: pini
Date: Fri Aug 25 02:16:00 2006
New Revision: 436731

URL: http://svn.apache.org/viewvc?rev=436731&view=rev
Log:
Fomatting fixes and parameter changes to const

Modified:
    webservices/axis2/trunk/c/include/axis2_http_client.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c

Modified: webservices/axis2/trunk/c/include/axis2_http_client.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_client.h?rev=436731&r1=436730&r2=436731&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_client.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_client.h Fri Aug 25 02:16:00 2006
@@ -51,118 +51,118 @@
      * HTTP Client ops struct
      * Encapsulator struct for ops of axis2_http_client
      */
-    AXIS2_DECLARE_DATA struct axis2_http_client_ops
+    struct axis2_http_client_ops
     {
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    * @param request pointer to request
-    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         * @param request pointer to request
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
-           send)(
-                    axis2_http_client_t *client, 
-          const axis2_env_t *env,
+                send)(
+                    axis2_http_client_t *client,
+                    const axis2_env_t *env,
                     axis2_http_simple_request_t *request);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         */
         int (AXIS2_CALL *
                 recieve_header)(
-                    axis2_http_client_t *client, 
-          const axis2_env_t *env);
+                    axis2_http_client_t *client,
+                    const axis2_env_t *env);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    */
-        axis2_http_simple_response_t* (AXIS2_CALL *
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         */
+        axis2_http_simple_response_t *(AXIS2_CALL *
                 get_response)(
-                    axis2_http_client_t *client, 
-          const axis2_env_t *env);
+                    const axis2_http_client_t *client,
+                    const axis2_env_t *env);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    * @param url pointer to url
-    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         * @param url pointer to url
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 set_url)(
                     axis2_http_client_t *client,
-                    const axis2_env_t *env, 
-          axis2_url_t *url);
+                    const axis2_env_t *env,
+                    axis2_url_t *url);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    */
-        axis2_url_t* (AXIS2_CALL *
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         */
+        axis2_url_t *(AXIS2_CALL *
                 get_url)(
-                    axis2_http_client_t *client,
+                    const axis2_http_client_t *client,
                     const axis2_env_t *env);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    * @param timeout_ms
-    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         * @param timeout_ms
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 set_timeout)(
                     axis2_http_client_t *client,
-                    const axis2_env_t *env, 
-          int timeout_ms);
+                    const axis2_env_t *env,
+                    int timeout_ms);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         */
         int (AXIS2_CALL *
                 get_timeout)(
-                    axis2_http_client_t *client,
+                    const axis2_http_client_t *client,
                     const axis2_env_t *env);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    * @param proxy_host pointer to proxy host
-    * @param proxy_port
-    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         * @param proxy_host pointer to proxy host
+         * @param proxy_port
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 set_proxy)(
                     axis2_http_client_t *client,
-                    const axis2_env_t *env, 
-          axis2_char_t *proxy_host,
+                    const axis2_env_t *env,
+                    axis2_char_t *proxy_host,
                     int proxy_port);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    */
-        axis2_char_t* (AXIS2_CALL *
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         */
+        axis2_char_t *(AXIS2_CALL *
                 get_proxy)(
-                    axis2_http_client_t *client,
+                    const axis2_http_client_t *client,
                     const axis2_env_t *env);
 
         /**
-    * @param client pointer to client
-    * @param env pointer to environment struct
-    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-    */
+         * @param client pointer to client
+         * @param env pointer to environment struct
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 free)(
-      axis2_http_client_t *client,
-                const axis2_env_t *env);
+                    axis2_http_client_t *client,
+                    const axis2_env_t *env);
     };
 
     /**
      * axis2 http client
      */
-    AXIS2_DECLARE_DATA struct axis2_http_client
+    struct axis2_http_client
     {
         /** operations of axis2 http client */
         axis2_http_client_ops_t *ops;
@@ -172,10 +172,10 @@
      * @param env pointer to environment struct
      * @param url pointer to url
      */
-    AXIS2_EXTERN axis2_http_client_t * AXIS2_CALL
-            axis2_http_client_create (
-                const axis2_env_t *env, 
-      axis2_url_t *url);
+    AXIS2_EXTERN axis2_http_client_t *AXIS2_CALL
+    axis2_http_client_create (
+        const axis2_env_t *env,
+        axis2_url_t *url);
 
     /**
      * Free http_client passed as void pointer. This will be
@@ -185,9 +185,9 @@
      * @param env pointer to environment struct
      */
     axis2_status_t AXIS2_CALL
-            axis2_http_client_free_void_arg (
-       void *client, 
-       const axis2_env_t *env);
+    axis2_http_client_free_void_arg (
+        void *client,
+        const axis2_env_t *env);
 
 /************************** Start of function macros **************************/
 
@@ -241,7 +241,7 @@
 /** Frees the http client.
     @sa axis2_http_client_ops#free */
 #define AXIS2_HTTP_CLIENT_FREE(client, env) \
-                                ((client)->ops->free(client, env)) 
+                                ((client)->ops->free(client, env))
 
 /************************** End of function macros ****************************/
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c?rev=436731&r1=436730&r2=436731&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c Fri Aug 25
02:16:00 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include <axis2_http_client.h>
 #include <axis2_http_transport.h>
 #include <axis2_stream.h>
@@ -30,160 +30,194 @@
 #endif
 
 
-/** 
+/**
  * @brief HTTP Client struct impl
  *   Axis2 HTTP Client impl  
  */
-typedef struct axis2_http_client_impl axis2_http_client_impl_t;  
-  
-struct axis2_http_client_impl
-{
-   axis2_http_client_t http_client;
-   int sockfd;
-   axis2_stream_t *data_stream;
-   axis2_url_t *url;
-   axis2_http_simple_response_t *response;
-   axis2_bool_t request_sent;
-   int timeout;
+
+typedef struct axis2_http_client_impl
+{
+    axis2_http_client_t http_client;
+    int sockfd;
+    axis2_stream_t *data_stream;
+    axis2_url_t *url;
+    axis2_http_simple_response_t *response;
+    axis2_bool_t request_sent;
+    int timeout;
     axis2_bool_t proxy_enabled;
     axis2_char_t *proxy_host;
     int proxy_port;
     axis2_char_t *proxy_host_port;
-};
+}
+axis2_http_client_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(http_client) \
                 ((axis2_http_client_impl_t *)(http_client))
 
 /***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL 
-axis2_http_client_send (axis2_http_client_t *client, const axis2_env_t *env,
-                  axis2_http_simple_request_t *request);
-int AXIS2_CALL 
-axis2_http_client_recieve_header (axis2_http_client_t *client, 
-                  const axis2_env_t *env);
 
-axis2_http_simple_response_t* AXIS2_CALL 
-axis2_http_client_get_response (axis2_http_client_t *client, const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_url (axis2_http_client_t *client, 
-                  const axis2_env_t *env, axis2_url_t *url);
-axis2_url_t* AXIS2_CALL 
-axis2_http_client_get_url (axis2_http_client_t *client, const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_timeout (axis2_http_client_t *client, const axis2_env_t *env, 
-                  int timeout_ms);
+axis2_status_t AXIS2_CALL
+axis2_http_client_send(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    axis2_http_simple_request_t *request);
+
+int AXIS2_CALL
+axis2_http_client_recieve_header(
+    axis2_http_client_t *client,
+    const axis2_env_t *env);
+
+axis2_http_simple_response_t *AXIS2_CALL
+axis2_http_client_get_response(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env);
 
-int AXIS2_CALL 
-axis2_http_client_get_timeout (axis2_http_client_t *client, const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_url(
+    axis2_http_client_t *client,
+    const axis2_env_t *env, 
+    axis2_url_t *url);
+
+axis2_url_t *AXIS2_CALL
+axis2_http_client_get_url(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env);
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_proxy(axis2_http_client_t *client, const axis2_env_t *env, 
-                        axis2_char_t *proxy_host, int proxy_port);
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_timeout(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    int timeout_ms);
+
+int AXIS2_CALL
+axis2_http_client_get_timeout(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env);
 
-axis2_char_t* AXIS2_CALL 
-axis2_http_client_get_proxy(axis2_http_client_t *client, const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_proxy(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    axis2_char_t *proxy_host, 
+    int proxy_port);
+
+axis2_char_t *AXIS2_CALL
+axis2_http_client_get_proxy(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env);
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_connect_ssl_host(axis2_http_client_t *client, 
-                        const axis2_env_t *env, axis2_char_t *host, int port);
+axis2_status_t AXIS2_CALL
+axis2_http_client_connect_ssl_host(
+    axis2_http_client_t *client,
+    const axis2_env_t *env, 
+    axis2_char_t *host, 
+    int port);
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_free (axis2_http_client_t *client, const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
+axis2_http_client_free(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL
-axis2_http_client_free_void_arg (void *client, const axis2_env_t *env);                 
   
+axis2_http_client_free_void_arg(
+    void *client, 
+    const axis2_env_t *env);
 
 /***************************** End of function headers ************************/
 
-AXIS2_EXTERN axis2_http_client_t * AXIS2_CALL 
-axis2_http_client_create (const axis2_env_t *env, axis2_url_t *url)
+AXIS2_EXTERN axis2_http_client_t *AXIS2_CALL
+axis2_http_client_create(
+    const axis2_env_t *env, 
+    axis2_url_t *url)
 {
     axis2_http_client_impl_t *http_client_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-            
-    http_client_impl = (axis2_http_client_impl_t *)AXIS2_MALLOC 
-                        (env->allocator, sizeof(axis2_http_client_impl_t));
-   
+
+    http_client_impl = (axis2_http_client_impl_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(axis2_http_client_impl_t));
+
     if(NULL == http_client_impl)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
-    
-   http_client_impl->url = url;
-   http_client_impl->data_stream = NULL;
-   http_client_impl->sockfd = -1;
-   http_client_impl->response = NULL;
-   http_client_impl->request_sent = AXIS2_FALSE;
-   http_client_impl->timeout = AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
+    }
+
+    http_client_impl->url = url;
+    http_client_impl->data_stream = NULL;
+    http_client_impl->sockfd = -1;
+    http_client_impl->response = NULL;
+    http_client_impl->request_sent = AXIS2_FALSE;
+    http_client_impl->timeout = AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
     http_client_impl->proxy_enabled = AXIS2_FALSE;
     http_client_impl->proxy_port = 0;
     http_client_impl->proxy_host = NULL;
     http_client_impl->proxy_host_port = NULL;
-   
+
     http_client_impl->http_client.ops = AXIS2_MALLOC(env->allocator,
-                  sizeof(axis2_http_client_ops_t));
+            sizeof(axis2_http_client_ops_t));
     if(NULL == http_client_impl->http_client.ops)
-   {
-      axis2_http_client_free((axis2_http_client_t*) http_client_impl, env);
+    {
+        axis2_http_client_free((axis2_http_client_t *) http_client_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
-    
-    http_client_impl->http_client.ops->send = axis2_http_client_send;             
          
-    http_client_impl->http_client.ops->recieve_header = 
-                  axis2_http_client_recieve_header;
-    http_client_impl->http_client.ops->get_response = 
-                  axis2_http_client_get_response;
-   http_client_impl->http_client.ops->set_url = axis2_http_client_set_url;
-   http_client_impl->http_client.ops->get_url = axis2_http_client_get_url;
-   http_client_impl->http_client.ops->set_timeout = 
-                  axis2_http_client_set_timeout;
-   http_client_impl->http_client.ops->get_timeout = 
-                  axis2_http_client_get_timeout;
-    http_client_impl->http_client.ops->set_proxy = 
-                        axis2_http_client_set_proxy;
-    http_client_impl->http_client.ops->get_proxy = 
-                        axis2_http_client_get_proxy;
+    }
+
+    http_client_impl->http_client.ops->send = axis2_http_client_send;
+    http_client_impl->http_client.ops->recieve_header =
+        axis2_http_client_recieve_header;
+    http_client_impl->http_client.ops->get_response =
+        axis2_http_client_get_response;
+    http_client_impl->http_client.ops->set_url = axis2_http_client_set_url;
+    http_client_impl->http_client.ops->get_url = axis2_http_client_get_url;
+    http_client_impl->http_client.ops->set_timeout =
+        axis2_http_client_set_timeout;
+    http_client_impl->http_client.ops->get_timeout =
+        axis2_http_client_get_timeout;
+    http_client_impl->http_client.ops->set_proxy =
+        axis2_http_client_set_proxy;
+    http_client_impl->http_client.ops->get_proxy =
+        axis2_http_client_get_proxy;
     http_client_impl->http_client.ops->free = axis2_http_client_free;
-                        
-   return &(http_client_impl->http_client);
+
+    return &(http_client_impl->http_client);
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_free (axis2_http_client_t *client, const axis2_env_t *env)
+axis2_status_t AXIS2_CALL
+axis2_http_client_free(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
     axis2_http_client_impl_t *http_client_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     http_client_impl = AXIS2_INTF_TO_IMPL(client);
-    
+
     if(NULL != http_client_impl->url)
     {
         AXIS2_URL_FREE(http_client_impl->url, env);
         http_client_impl->url = NULL;
     }
-   if(NULL != http_client_impl->response)
+    if(NULL != http_client_impl->response)
     {
         AXIS2_HTTP_SIMPLE_RESPONSE_FREE(http_client_impl->response, env);
         http_client_impl->response  = NULL;
     }
-   if(-1 != http_client_impl->sockfd)
-   {
-      axis2_network_handler_close_socket(env, http_client_impl->sockfd);
-      http_client_impl->sockfd = -1;
-   }
+    if(-1 != http_client_impl->sockfd)
+    {
+        axis2_network_handler_close_socket(env, http_client_impl->sockfd);
+        http_client_impl->sockfd = -1;
+    }
     if(NULL != client->ops)
         AXIS2_FREE(env->allocator, client->ops);
-    
-   AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(client));
-   return AXIS2_SUCCESS;
+
+    AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(client));
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_http_client_free_void_arg (void *client, const axis2_env_t *env)
+axis2_http_client_free_void_arg(
+    void *client, 
+    const axis2_env_t *env)
 {
     axis2_http_client_t *client_l = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -193,132 +227,134 @@
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_send (axis2_http_client_t *client, const axis2_env_t *env,
-                  axis2_http_simple_request_t *request)
+axis2_status_t AXIS2_CALL
+axis2_http_client_send(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    axis2_http_simple_request_t *request)
 {
     axis2_http_client_impl_t *client_impl = NULL;
-   char *wire_format = NULL;
-   axis2_array_list_t *headers = NULL;
-   char *str_header = NULL;
-   char *str_body = NULL;
-   char *str_request_line = NULL;
-   int body_size = 0;
-   int written = 0;
-   axis2_status_t status = AXIS2_FAILURE;
-   axis2_bool_t chunking_enabled = AXIS2_FALSE;
-   
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    char *wire_format = NULL;
+    axis2_array_list_t *headers = NULL;
+    char *str_header = NULL;
+    char *str_body = NULL;
+    char *str_request_line = NULL;
+    int body_size = 0;
+    int written = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_bool_t chunking_enabled = AXIS2_FALSE;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     client_impl = AXIS2_INTF_TO_IMPL(client);
-   
-   if(NULL == client_impl->url)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_URL, AXIS2_FAILURE);
-      return AXIS2_FAILURE;
-   }
+
+    if(NULL == client_impl->url)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_URL, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
     if(AXIS2_TRUE == client_impl->proxy_enabled)
     {
         if(NULL == client_impl->proxy_host || client_impl->proxy_port <= 0)
         {
             return AXIS2_FAILURE;
         }
-       client_impl->sockfd = axis2_network_handler_open_socket(env, 
-                  client_impl->proxy_host, client_impl->proxy_port);
+        client_impl->sockfd = axis2_network_handler_open_socket(env,
+                client_impl->proxy_host, client_impl->proxy_port);
     }
     else
     {
-        client_impl->sockfd = axis2_network_handler_open_socket(env, 
-                  AXIS2_URL_GET_SERVER(client_impl->url, env), 
-                  AXIS2_URL_GET_PORT(client_impl->url, env));
-    }
-   if(client_impl->sockfd < 0)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
-      return AXIS2_FAILURE;
-   }
-   /* ONLY FOR TESTING
-    * client_impl->data_stream = axis2_stream_create_file(env, 
-    *            stdout);
-    */
-   if(client_impl->timeout > 0)
-   {
-      axis2_network_handler_set_sock_option(env, client_impl->sockfd, 
-                  SO_RCVTIMEO, client_impl->timeout);
-      axis2_network_handler_set_sock_option(env, client_impl->sockfd, 
-                  SO_SNDTIMEO, client_impl->timeout);
-   }
-    if(0 == AXIS2_STRCASECMP(AXIS2_URL_GET_PROTOCOL(client_impl->url, env), 
-                        "HTTPS"))
+        client_impl->sockfd = axis2_network_handler_open_socket(env,
+                AXIS2_URL_GET_SERVER(client_impl->url, env),
+                AXIS2_URL_GET_PORT(client_impl->url, env));
+    }
+    if(client_impl->sockfd < 0)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    /* ONLY FOR TESTING
+     * client_impl->data_stream = axis2_stream_create_file(env, 
+     *            stdout);
+     */
+    if(client_impl->timeout > 0)
+    {
+        axis2_network_handler_set_sock_option(env, client_impl->sockfd,
+                SO_RCVTIMEO, client_impl->timeout);
+        axis2_network_handler_set_sock_option(env, client_impl->sockfd,
+                SO_SNDTIMEO, client_impl->timeout);
+    }
+    if(0 == AXIS2_STRCASECMP(AXIS2_URL_GET_PROTOCOL(client_impl->url, env),
+            "HTTPS"))
     {
 #ifdef AXIS2_SSL_ENABLED
-        if(AXIS2_TRUE == client_impl->proxy_enabled) 
+        if(AXIS2_TRUE == client_impl->proxy_enabled)
         {
-            if(AXIS2_SUCCESS != axis2_http_client_connect_ssl_host(client, env, 
-                        AXIS2_URL_GET_SERVER(client_impl->url, env), 
-                        AXIS2_URL_GET_PORT(client_impl->url, env)))
+            if(AXIS2_SUCCESS != axis2_http_client_connect_ssl_host(client, env,
+                    AXIS2_URL_GET_SERVER(client_impl->url, env),
+                    AXIS2_URL_GET_PORT(client_impl->url, env)))
             {
                 return AXIS2_FAILURE;
             }
         }
-        client_impl->data_stream = axis2_stream_create_ssl(env, 
-                        client_impl->sockfd);
+        client_impl->data_stream = axis2_stream_create_ssl(env,
+                client_impl->sockfd);
 #else
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_TRANSPORT_PROTOCOL,
-                        AXIS2_FAILURE);
+                AXIS2_FAILURE);
         return AXIS2_FAILURE;
 #endif
     }
     else
     {
-       client_impl->data_stream = axis2_stream_create_socket(env, 
-               client_impl->sockfd);
+        client_impl->data_stream = axis2_stream_create_socket(env,
+                client_impl->sockfd);
+    }
+
+    if(NULL == client_impl->data_stream)
+    {
+        axis2_network_handler_close_socket(env, client_impl->sockfd);
+        return AXIS2_FAILURE;
+    }
+
+    headers = AXIS2_HTTP_SIMPLE_REQUEST_GET_HEADERS(request, env);
+    if(NULL != headers)
+    {
+        int header_count = AXIS2_ARRAY_LIST_SIZE(headers, env);
+        int i = 0;
+        char *str_header2 = NULL;
+        for(i = 0; i < header_count; i++)
+        {
+            axis2_char_t *header_ext_form = NULL;
+            axis2_http_header_t *tmp_header = (axis2_http_header_t *)
+                    AXIS2_ARRAY_LIST_GET(headers, env, i);
+            if(NULL == tmp_header)
+            {
+                continue;
+            }
+            /* check whether we have transfer encoding and then see whether the
+             * value is "chunked" */
+            if(0 == AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env),
+                    AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 0 ==
+                    AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_VALUE(tmp_header,
+                            env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+            {
+                chunking_enabled = AXIS2_TRUE;
+            }
+            header_ext_form = AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(
+                        tmp_header, env);
+            str_header2 = AXIS2_STRACAT(str_header, header_ext_form, env);
+            AXIS2_FREE(env->allocator, str_header);
+            str_header = NULL;
+            AXIS2_FREE(env->allocator, header_ext_form);
+            header_ext_form = NULL;
+            str_header = str_header2;
+        }
     }
-   
-   if(NULL == client_impl->data_stream)
-   {
-      axis2_network_handler_close_socket(env, client_impl->sockfd);
-      return AXIS2_FAILURE;
-   }
-   
-   headers = AXIS2_HTTP_SIMPLE_REQUEST_GET_HEADERS(request, env);
-   if(NULL != headers)
-   {
-      int header_count = AXIS2_ARRAY_LIST_SIZE(headers, env);
-      int i = 0;
-      char *str_header2 = NULL;
-      for(i = 0; i < header_count; i++)
-      {
-          axis2_char_t *header_ext_form = NULL;
-         axis2_http_header_t *tmp_header = (axis2_http_header_t*)
-                  AXIS2_ARRAY_LIST_GET(headers, env, i);
-         if(NULL == tmp_header)
-         {
-            continue;
-         }
-         /* check whether we have transfer encoding and then see whether the
-          * value is "chunked" */
-         if(0 == AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_NAME(tmp_header, env), 
-                  AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 0 == 
-                  AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, 
-                  env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
-         {
-            chunking_enabled = AXIS2_TRUE;
-         }
-         header_ext_form = AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(
-                  tmp_header, env);
-         str_header2 = AXIS2_STRACAT(str_header, header_ext_form, env);
-         AXIS2_FREE(env->allocator, str_header);
-         str_header = NULL;
-         AXIS2_FREE(env->allocator, header_ext_form);
-         header_ext_form = NULL;
-         str_header = str_header2;
-      }
-   }
     if(AXIS2_FALSE == client_impl->proxy_enabled)
     {
         str_request_line = AXIS2_HTTP_REQUEST_LINE_TO_STRING(
-                  AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(request, env)
-                  , env);
+                    AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(request, env)
+                    , env);
     }
     else
     {
@@ -327,129 +363,132 @@
          */
         axis2_char_t *host_port_str = NULL;
         axis2_char_t *server = AXIS2_URL_GET_SERVER(client_impl->url, env);
-        axis2_http_request_line_t *request_line = 
-                        AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(request, env);
+        axis2_http_request_line_t *request_line =
+            AXIS2_HTTP_SIMPLE_REQUEST_GET_REQUEST_LINE(request, env);
         axis2_char_t *path = AXIS2_HTTP_REQUEST_LINE_GET_URI(request_line, env);
-                
-        
+
+
         /* length = len(server) + len(:port) + len("http://") + len(path) + 1*/
         host_port_str = AXIS2_MALLOC(env->allocator, AXIS2_STRLEN(server) +
-                        + AXIS2_STRLEN(path) +  20 * sizeof(axis2_char_t));
+                + AXIS2_STRLEN(path) +  20 * sizeof(axis2_char_t));
         if(NULL == host_port_str)
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
         sprintf(host_port_str, "http://%s:%d%s", server, AXIS2_URL_GET_PORT(
-                        client_impl->url, env), path);
-        str_request_line = AXIS2_MALLOC(env->allocator, 
-                        AXIS2_STRLEN(host_port_str) + 20 * sizeof(axis2_char_t));
-        sprintf(str_request_line, "%s %s %s\r\n", 
-                        AXIS2_HTTP_REQUEST_LINE_GET_METHOD(request_line, env), 
-                        host_port_str, AXIS2_HTTP_REQUEST_LINE_GET_HTTP_VERSION(
-                        request_line, env));
+                    client_impl->url, env), path);
+        str_request_line = AXIS2_MALLOC(env->allocator,
+                AXIS2_STRLEN(host_port_str) + 20 *sizeof(axis2_char_t));
+        sprintf(str_request_line, "%s %s %s\r\n",
+                AXIS2_HTTP_REQUEST_LINE_GET_METHOD(request_line, env),
+                host_port_str, AXIS2_HTTP_REQUEST_LINE_GET_HTTP_VERSION(
+                    request_line, env));
         AXIS2_FREE(env->allocator, host_port_str);
         host_port_str = NULL;
-         
+
     }
-   wire_format = AXIS2_STRACAT(str_request_line, str_header, env);
-   AXIS2_FREE(env->allocator, str_header);
-   str_header = NULL;
-   AXIS2_FREE(env->allocator, str_request_line);
-   str_request_line = NULL;
-   written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, wire_format, 
-                  AXIS2_STRLEN(wire_format));
-   AXIS2_FREE(env->allocator, wire_format);
-   wire_format = NULL;
-   written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, AXIS2_HTTP_CRLF, 
-                  2);
-   body_size = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY_BYTES(request, env, 
-                  &str_body);
-   if(body_size > 0 && NULL != str_body)
-   {
-      if(AXIS2_FALSE == chunking_enabled)
-      {
-         status = AXIS2_SUCCESS;
-         while(written < body_size)
-         {
-            written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, 
+    wire_format = AXIS2_STRACAT(str_request_line, str_header, env);
+    AXIS2_FREE(env->allocator, str_header);
+    str_header = NULL;
+    AXIS2_FREE(env->allocator, str_request_line);
+    str_request_line = NULL;
+    written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, wire_format,
+            AXIS2_STRLEN(wire_format));
+    AXIS2_FREE(env->allocator, wire_format);
+    wire_format = NULL;
+    written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, AXIS2_HTTP_CRLF,
+            2);
+    body_size = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY_BYTES(request, env,
+            &str_body);
+    if(body_size > 0 && NULL != str_body)
+    {
+        if(AXIS2_FALSE == chunking_enabled)
+        {
+            status = AXIS2_SUCCESS;
+            while(written < body_size)
+            {
+                written = AXIS2_STREAM_WRITE(client_impl->data_stream, env,
                         str_body, body_size);
-            if(-1 == written)
+                if(-1 == written)
+                {
+                    status = AXIS2_FAILURE;
+                    break;
+                }
+            }
+        }
+        else
+        {
+            axis2_http_chunked_stream_t *chunked_stream = NULL;
+            chunked_stream = axis2_http_chunked_stream_create(env,
+                    client_impl->data_stream);
+            status = AXIS2_SUCCESS;
+            if(NULL == chunked_stream)
+            {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creatoin of chunked"
+                        "stream failed");
+                return AXIS2_FAILURE;
+            }
+            while(written < body_size)
             {
-               status = AXIS2_FAILURE;
-               break;
+                written = AXIS2_HTTP_CHUNKED_STREAM_WRITE(chunked_stream, env,
+                        str_body, body_size);
+                if(-1 == written)
+                {
+                    status = AXIS2_FAILURE;
+                    break;
+                }
             }
-         }
-      }
-      else
-      {
-         axis2_http_chunked_stream_t *chunked_stream = NULL;
-         chunked_stream = axis2_http_chunked_stream_create(env, 
-                     client_impl->data_stream);
-         status = AXIS2_SUCCESS;
-         if(NULL == chunked_stream)
-         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creatoin of chunked"
-                     "stream failed");
-            return AXIS2_FAILURE;
-         }
-         while(written < body_size)
-         {
-            written = AXIS2_HTTP_CHUNKED_STREAM_WRITE(chunked_stream, env, 
-                     str_body, body_size);
-            if(-1 == written)
-            {
-               status = AXIS2_FAILURE;
-               break;
-            }
-         }
-         if(AXIS2_SUCCESS == status)
-         {
-            AXIS2_HTTP_CHUNKED_STREAM_WRITE_LAST_CHUNK(chunked_stream, env);
-         }
-         AXIS2_HTTP_CHUNKED_STREAM_FREE(chunked_stream, env);
-      }
-   }
-   
-   client_impl->request_sent = AXIS2_TRUE;
-   if(NULL != str_body)
-   {
-      AXIS2_FREE(env->allocator, str_body);
-      str_body = NULL;
-   }
+            if(AXIS2_SUCCESS == status)
+            {
+                AXIS2_HTTP_CHUNKED_STREAM_WRITE_LAST_CHUNK(chunked_stream, env);
+            }
+            AXIS2_HTTP_CHUNKED_STREAM_FREE(chunked_stream, env);
+        }
+    }
+
+    client_impl->request_sent = AXIS2_TRUE;
+    if(NULL != str_body)
+    {
+        AXIS2_FREE(env->allocator, str_body);
+        str_body = NULL;
+    }
     return status;
 }
 
 
-int AXIS2_CALL 
-axis2_http_client_recieve_header(axis2_http_client_t *client, const axis2_env_t *env)
+int AXIS2_CALL
+axis2_http_client_recieve_header(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
-   int status_code = -1;
-   axis2_http_client_impl_t *client_impl = NULL;
-   axis2_http_status_line_t *status_line = NULL;
-   axis2_char_t str_status_line[512];
-   axis2_char_t tmp_buf[3];
-   axis2_char_t str_header[512];
-   int read = 0;
-   int http_status = 0;
-   axis2_bool_t end_of_line = AXIS2_FALSE;
-   axis2_bool_t end_of_headers = AXIS2_FALSE;
-   
+    int status_code = -1;
+    axis2_http_client_impl_t *client_impl = NULL;
+    axis2_http_status_line_t *status_line = NULL;
+    axis2_char_t str_status_line[512];
+    axis2_char_t tmp_buf[3];
+    axis2_char_t str_header[512];
+    int read = 0;
+    int http_status = 0;
+    axis2_bool_t end_of_line = AXIS2_FALSE;
+    axis2_bool_t end_of_headers = AXIS2_FALSE;
+
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
-   
-   client_impl = AXIS2_INTF_TO_IMPL(client);
-   if(-1 == client_impl->sockfd || NULL == client_impl->data_stream || 
-                  AXIS2_FALSE == client_impl->request_sent)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_HTTP_REQUEST_NOT_SENT, 
-                  AXIS2_FAILURE);
-      return -1;
-   }
-   /* read the status line */
-    do {
-       memset(str_status_line, 0, 512);
-        while((read = AXIS2_STREAM_READ(client_impl->data_stream, env, tmp_buf, 
-                            1)) > 0)
+
+    client_impl = AXIS2_INTF_TO_IMPL(client);
+    if(-1 == client_impl->sockfd || NULL == client_impl->data_stream ||
+            AXIS2_FALSE == client_impl->request_sent)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_HTTP_REQUEST_NOT_SENT,
+                AXIS2_FAILURE);
+        return -1;
+    }
+    /* read the status line */
+    do
+    {
+        memset(str_status_line, 0, 512);
+        while((read = AXIS2_STREAM_READ(client_impl->data_stream, env, tmp_buf,
+                1)) > 0)
         {
             tmp_buf[read] = '\0';
             strcat(str_status_line, tmp_buf);
@@ -459,74 +498,75 @@
                 break;
             }
         }
-        
+
         if (read < 0)
         {
-            AXIS2_ERROR_SET(env->error, 
-                            AXIS2_ERROR_RESPONSE_TIMED_OUT, 
-                            AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error,
+                    AXIS2_ERROR_RESPONSE_TIMED_OUT,
+                    AXIS2_FAILURE);
             return -1;
         }
         status_line = axis2_http_status_line_create(env, str_status_line);
         if(NULL == status_line)
         {
-            AXIS2_ERROR_SET(env->error, 
-                            AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE, 
-                            AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error,
+                    AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                    AXIS2_FAILURE);
             /*return -1;*/
             http_status = 0;
             continue;
-            
+
         }
         http_status = AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env);
-    } while(AXIS2_HTTP_RESPONSE_OK_CODE_VAL > http_status);
+    }
+    while(AXIS2_HTTP_RESPONSE_OK_CODE_VAL > http_status);
 
-   client_impl->response = axis2_http_simple_response_create_default(env);
-   AXIS2_HTTP_SIMPLE_RESPONSE_SET_STATUS_LINE(client_impl->response, env, 
-                  AXIS2_HTTP_STATUS_LINE_GET_HTTP_VERSION(status_line, 
-                  env), AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(
-                  status_line, env), 
-                  AXIS2_HTTP_STATUS_LINE_GET_REASON_PHRASE(status_line, 
-                  env));
-
-   /* now read the headers */
-   memset(str_header, 0, 512);
-   end_of_line = AXIS2_FALSE;
-   while(AXIS2_FALSE == end_of_headers)
-   {
-      while((read = AXIS2_STREAM_READ(client_impl->data_stream, env, tmp_buf, 
-                     1)) > 0)
-      {
-         tmp_buf[read] = '\0';
-         strcat(str_header, tmp_buf);
-         if(0 != strstr(str_header, AXIS2_HTTP_CRLF))
-         {
-            end_of_line = AXIS2_TRUE;
-            break;
-         }
-      }
-      if(AXIS2_TRUE == end_of_line)
-      {
-         if(0 == AXIS2_STRCMP(str_header, AXIS2_HTTP_CRLF))
-         {
-            end_of_headers = AXIS2_TRUE;
-         }
-         else
-         {
-            axis2_http_header_t *tmp_header = 
-                  axis2_http_header_create_by_str(env, str_header);
-            memset(str_header, 0, 512);
-            if(NULL != tmp_header)
-            {
-               AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADER(client_impl->response,
-                  env, tmp_header);
-            }
-         }
-      }
-      end_of_line = AXIS2_FALSE;
-   }
-   AXIS2_HTTP_SIMPLE_RESPONSE_SET_BODY_STREAM(client_impl->response, env, 
-                  client_impl->data_stream); 
+    client_impl->response = axis2_http_simple_response_create_default(env);
+    AXIS2_HTTP_SIMPLE_RESPONSE_SET_STATUS_LINE(client_impl->response, env,
+            AXIS2_HTTP_STATUS_LINE_GET_HTTP_VERSION(status_line,
+                    env), AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(
+                status_line, env),
+            AXIS2_HTTP_STATUS_LINE_GET_REASON_PHRASE(status_line,
+                    env));
+
+    /* now read the headers */
+    memset(str_header, 0, 512);
+    end_of_line = AXIS2_FALSE;
+    while(AXIS2_FALSE == end_of_headers)
+    {
+        while((read = AXIS2_STREAM_READ(client_impl->data_stream, env, tmp_buf,
+                1)) > 0)
+        {
+            tmp_buf[read] = '\0';
+            strcat(str_header, tmp_buf);
+            if(0 != strstr(str_header, AXIS2_HTTP_CRLF))
+            {
+                end_of_line = AXIS2_TRUE;
+                break;
+            }
+        }
+        if(AXIS2_TRUE == end_of_line)
+        {
+            if(0 == AXIS2_STRCMP(str_header, AXIS2_HTTP_CRLF))
+            {
+                end_of_headers = AXIS2_TRUE;
+            }
+            else
+            {
+                axis2_http_header_t *tmp_header =
+                    axis2_http_header_create_by_str(env, str_header);
+                memset(str_header, 0, 512);
+                if(NULL != tmp_header)
+                {
+                    AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADER(client_impl->response,
+                            env, tmp_header);
+                }
+            }
+        }
+        end_of_line = AXIS2_FALSE;
+    }
+    AXIS2_HTTP_SIMPLE_RESPONSE_SET_BODY_STREAM(client_impl->response, env,
+            client_impl->data_stream);
     if(NULL != status_line)
     {
         status_code = AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env);
@@ -534,72 +574,85 @@
         status_line = NULL;
     }
     if(AXIS2_FALSE == AXIS2_HTTP_SIMPLE_RESPONSE_CONTAINS_HEADER(
-                        client_impl->response, env,
-                        AXIS2_HTTP_HEADER_CONTENT_TYPE) && 202 != status_code
-                        && AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(
-                        client_impl->response, env) > 0)
+                client_impl->response, env,
+                AXIS2_HTTP_HEADER_CONTENT_TYPE) && 202 != status_code
+            && AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(
+                client_impl->response, env) > 0)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_RESPONSE_CONTENT_TYPE_MISSING
                 , AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Response does not contain"
-                        " Content-Type");
+                " Content-Type");
         return -1;
     }
     return status_code;
 }
 
 
-axis2_http_simple_response_t* AXIS2_CALL 
-axis2_http_client_get_response (axis2_http_client_t *client, const axis2_env_t *env)
+axis2_http_simple_response_t *AXIS2_CALL
+axis2_http_client_get_response(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(client)->response;
 }
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_url (axis2_http_client_t *client, 
-                  const axis2_env_t *env, axis2_url_t *url)
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_url(
+    axis2_http_client_t *client,
+    const axis2_env_t *env, 
+    axis2_url_t *url)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, url, AXIS2_FAILURE);
-   if(NULL != AXIS2_INTF_TO_IMPL(client)->url)
-   {
-      AXIS2_URL_FREE(AXIS2_INTF_TO_IMPL(client)->url, env);
-      AXIS2_INTF_TO_IMPL(client)->url = NULL;
-   }
+    AXIS2_PARAM_CHECK(env->error, url, AXIS2_FAILURE);
+    if(NULL != AXIS2_INTF_TO_IMPL(client)->url)
+    {
+        AXIS2_URL_FREE(AXIS2_INTF_TO_IMPL(client)->url, env);
+        AXIS2_INTF_TO_IMPL(client)->url = NULL;
+    }
     AXIS2_INTF_TO_IMPL(client)->url = url;
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
-axis2_url_t* AXIS2_CALL 
-axis2_http_client_get_url (axis2_http_client_t *client, const axis2_env_t *env)
+axis2_url_t *AXIS2_CALL
+axis2_http_client_get_url(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(client)->url;
 }
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_timeout (axis2_http_client_t *client, const axis2_env_t *env, 
-                  int timeout_ms)
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_timeout(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    int timeout_ms)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(client)->timeout = timeout_ms;
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
-int AXIS2_CALL 
-axis2_http_client_get_timeout (axis2_http_client_t *client, const axis2_env_t *env)
+int AXIS2_CALL
+axis2_http_client_get_timeout(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
     return AXIS2_INTF_TO_IMPL(client)->timeout;
 }
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_set_proxy(axis2_http_client_t *client, const axis2_env_t *env, 
-                        axis2_char_t *proxy_host, int proxy_port)
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_proxy(
+    axis2_http_client_t *client, 
+    const axis2_env_t *env,
+    axis2_char_t *proxy_host, 
+    int proxy_port)
 {
     axis2_http_client_impl_t *client_impl = NULL;
-    
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, proxy_host, AXIS2_FAILURE);
     if(proxy_port <= 0)
@@ -624,22 +677,27 @@
         return AXIS2_FAILURE;
     }
     client_impl->proxy_host_port = AXIS2_MALLOC(env->allocator, AXIS2_STRLEN(
-                            proxy_host) + 10 * sizeof(axis2_char_t));
+                proxy_host) + 10 * sizeof(axis2_char_t));
     sprintf(client_impl->proxy_host_port, "%s:%d", proxy_host, proxy_port);
     client_impl->proxy_enabled = AXIS2_TRUE;
     return AXIS2_SUCCESS;
 }
 
-axis2_char_t* AXIS2_CALL 
-axis2_http_client_get_proxy(axis2_http_client_t *client, const axis2_env_t *env)
+axis2_char_t *AXIS2_CALL
+axis2_http_client_get_proxy(
+    const axis2_http_client_t *client, 
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(client)->proxy_host_port;
 }
 
-axis2_status_t AXIS2_CALL 
-axis2_http_client_connect_ssl_host(axis2_http_client_t *client, 
-                        const axis2_env_t *env, axis2_char_t *host, int port)
+axis2_status_t AXIS2_CALL
+axis2_http_client_connect_ssl_host(
+    axis2_http_client_t *client,
+    const axis2_env_t *env, 
+    axis2_char_t *host, 
+    int port)
 {
     axis2_stream_t *tmp_stream = NULL;
     axis2_char_t *connect_string = NULL;
@@ -650,28 +708,28 @@
     axis2_bool_t end_of_response = AXIS2_FALSE;
     axis2_http_client_impl_t *client_impl = NULL;
     axis2_http_status_line_t *status_line = NULL;
-    
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, host, AXIS2_FAILURE);
-    
+
     client_impl = AXIS2_INTF_TO_IMPL(client);
     if(port <= 0)
     {
         return AXIS2_FAILURE;
     }
-    
+
     tmp_stream = axis2_stream_create_socket(env, client_impl->sockfd);
     if(NULL == tmp_stream)
     {
         return AXIS2_FAILURE;
     }
-    connect_string = AXIS2_MALLOC(env->allocator, 
-                        AXIS2_STRLEN(host) * sizeof(axis2_char_t) +
-                        30 * sizeof(axis2_char_t));
+    connect_string = AXIS2_MALLOC(env->allocator,
+            AXIS2_STRLEN(host) * sizeof(axis2_char_t) +
+            30 * sizeof(axis2_char_t));
     sprintf(connect_string, "CONNECT %s:%d HTTP/1.0\r\n\r\n", host, port);
-    AXIS2_STREAM_WRITE(tmp_stream, env, connect_string, 
-                    AXIS2_STRLEN(connect_string) * sizeof(axis2_char_t));
-    
+    AXIS2_STREAM_WRITE(tmp_stream, env, connect_string,
+            AXIS2_STRLEN(connect_string) * sizeof(axis2_char_t));
+
     memset(str_status_line, 0, 512);
     while((read = AXIS2_STREAM_READ(tmp_stream, env, tmp_buf, 1)) > 0)
     {
@@ -685,17 +743,17 @@
     }
     if (read < 0)
     {
-        AXIS2_ERROR_SET(env->error, 
-                        AXIS2_ERROR_RESPONSE_TIMED_OUT, 
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_RESPONSE_TIMED_OUT,
+                AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     status_line = axis2_http_status_line_create(env, str_status_line);
     if(NULL == status_line)
     {
-        AXIS2_ERROR_SET(env->error, 
-                        AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE, 
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     if(200 != AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env))



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message