You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/04/27 13:04:31 UTC
svn commit: r533064 -
/webservices/axis2/trunk/c/src/core/transport/http/common/simple_http_svr_conn.c
Author: samisa
Date: Fri Apr 27 04:04:30 2007
New Revision: 533064
URL: http://svn.apache.org/viewvc?view=rev&rev=533064
Log:
Fixed buffer size bug
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?view=diff&rev=533064&r1=533063&r2=533064
==============================================================================
--- 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 Fri Apr 27 04:04:30 2007
@@ -166,7 +166,7 @@
AXIS2_ENV_CHECK(env, NULL);
memset(str_line, 0, 2048);
- while ((read = axutil_stream_peek_socket(svr_conn->stream, env, tmp_buf, 2048)) > 0)
+ 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;
@@ -188,7 +188,7 @@
}
else
{
- read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 2048);
+ read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 2048 - 1);
if (read > 0)
{
tmp_buf[read] = '\0';
@@ -227,7 +227,7 @@
end_of_line = AXIS2_FALSE;
while (AXIS2_FALSE == end_of_headers)
{
- while ((read = axutil_stream_peek_socket(svr_conn->stream, env, tmp_buf, 2048)) > 0)
+ 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;
@@ -250,26 +250,16 @@
}
else
{
- read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 2048);
+ read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 2048 - 1);
if (read > 0)
{
tmp_buf[read] = '\0';
strcat(str_line, tmp_buf);
}
}
+
}
-
- /*while ((read = axutil_stream_read(svr_conn->stream, env, tmp_buf,
- 1)) > 0)
- {
- tmp_buf[read] = '\0';
- strcat(str_line, tmp_buf);
- if (0 != strstr(str_line, AXIS2_HTTP_CRLF))
- {
- end_of_line = AXIS2_TRUE;
- break;
- }
- }*/
+
if (AXIS2_TRUE == end_of_line)
{
if (0 == axutil_strcmp(str_line, AXIS2_HTTP_CRLF))
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org