axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r731918 - /webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c
Date Tue, 06 Jan 2009 11:40:05 GMT
Author: shankar
Date: Tue Jan  6 03:40:04 2009
New Revision: 731918

URL: http://svn.apache.org/viewvc?rev=731918&view=rev
Log:
Fix for issue AXIS2C-1169

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c?rev=731918&r1=731917&r2=731918&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c Tue Jan
 6 03:40:04 2009
@@ -215,12 +215,14 @@
     end_of_line = AXIS2_FALSE;
     while (AXIS2_FALSE == end_of_headers)
     {
+	axis2_bool_t is_read = AXIS2_FALSE;
         while ((read =
                 axutil_stream_peek_socket(svr_conn->stream, env, tmp_buf,
                                           2048 - 1)) > 0)
         {
             axis2_char_t *start = tmp_buf;
             axis2_char_t *end = NULL;
+            is_read = AXIS2_TRUE;
             tmp_buf[read] = AXIS2_ESC_NULL;
             end = strstr(tmp_buf, AXIS2_HTTP_CRLF);
             if (end)
@@ -273,6 +275,10 @@
             }
         }
         end_of_line = AXIS2_FALSE;
+        if(!is_read)
+        {
+            break; /*if nothing is read, this loop should be broken. Otherwise, going to
be endless loop */
+        }
     }
     return request;
 }



Mime
View raw message