axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r1050808 - /axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c
Date Sun, 19 Dec 2010 11:01:55 GMT
Author: nandika
Date: Sun Dec 19 11:01:55 2010
New Revision: 1050808

URL: http://svn.apache.org/viewvc?rev=1050808&view=rev
Log:
defined constants, header length definition increase to 1024

Modified:
    axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c

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=1050808&r1=1050807&r2=1050808&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 Sun Dec 19 11:01:55
2010
@@ -32,6 +32,9 @@
 #include "ssl/ssl_stream.h"
 #endif
 
+#define AXIS2_HTTP_HEADER_LENGTH 1024
+#define AXIS2_HTTP_STATUS_LINE_LENGTH 512
+
 struct axis2_http_client
 {
     int sockfd;
@@ -551,9 +554,9 @@ axis2_http_client_receive_header(
 {
     int status_code = -1;
     axis2_http_status_line_t *status_line = NULL;
-    axis2_char_t str_status_line[512];
+    axis2_char_t str_status_line[AXIS2_HTTP_STATUS_LINE_LENGTH];
     axis2_char_t tmp_buf[3];
-    axis2_char_t str_header[512];
+    axis2_char_t str_header[AXIS2_HTTP_HEADER_LENGTH];
     int read = 0;
     int http_status = 0;
     axis2_bool_t end_of_line = AXIS2_FALSE;
@@ -575,7 +578,7 @@ axis2_http_client_receive_header(
     /* read the status line */
     do
     {
-        memset(str_status_line, 0, 512);
+        memset(str_status_line, 0, AXIS2_HTTP_STATUS_LINE_LENGTH);
         while((read = axutil_stream_read(client->data_stream, env, tmp_buf, 1)) > 0)
         {
             /* "read" variable is number of characters read by stream */
@@ -626,7 +629,7 @@ str_status_line %s", str_status_line);
         axis2_http_status_line_get_reason_phrase(status_line, env));
 
     /* now read the headers */
-    memset(str_header, 0, 512);
+    memset(str_header, 0, AXIS2_HTTP_HEADER_LENGTH);
     end_of_line = AXIS2_FALSE;
     while(AXIS2_FALSE == end_of_headers)
     {
@@ -649,7 +652,7 @@ str_status_line %s", str_status_line);
             else
             {
                 axis2_http_header_t *tmp_header = axis2_http_header_create_by_str(env, str_header);
-                memset(str_header, 0, 512);
+                memset(str_header, 0, AXIS2_HTTP_HEADER_LENGTH);
                 if(tmp_header)
                 {
                     axis2_http_simple_response_set_header(client->response, env, tmp_header);
@@ -792,7 +795,7 @@ axis2_http_client_connect_ssl_host(
 {
     axutil_stream_t *tmp_stream = NULL;
     axis2_char_t *connect_string = NULL;
-    axis2_char_t str_status_line[512];
+    axis2_char_t str_status_line[AXIS2_HTTP_STATUS_LINE_LENGTH];
     axis2_char_t tmp_buf[3];
     int read = 0;
     axis2_bool_t end_of_line = AXIS2_FALSE;
@@ -824,7 +827,7 @@ axis2_http_client_connect_ssl_host(
     axutil_stream_write(tmp_stream, env, connect_string, axutil_strlen(connect_string)
         * sizeof(axis2_char_t));
 
-    memset(str_status_line, 0, 512);
+    memset(str_status_line, 0, AXIS2_HTTP_STATUS_LINE_LENGTH);
     while((read = axutil_stream_read(tmp_stream, env, tmp_buf, 1)) > 0)
     {
         tmp_buf[read] = '\0';
@@ -858,7 +861,7 @@ axis2_http_client_connect_ssl_host(
     }
     /* We need to empty the stream before we return
      */
-    memset(str_status_line, 0, 512);
+    memset(str_status_line, 0, AXIS2_HTTP_STATUS_LINE_LENGTH);
     while(AXIS2_FALSE == end_of_response)
     {
         while((read = axutil_stream_read(tmp_stream, env, tmp_buf, 1)) > 0)



Mime
View raw message