Author: amassari
Date: Tue Jun 21 12:09:18 2011
New Revision: 1137970
URL: http://svn.apache.org/viewvc?rev=1137970&view=rev
Log:
If the receive() function returns 0, it means the connection has been
gracefully closed, and we have to stop reading from it (XERCESC-1968)
Modified:
xerces/c/trunk/src/xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp
Modified:
xerces/c/trunk/src/xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp?rev=1137970&r1=1137969&r2=1137970&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp
(original)
+++ xerces/c/trunk/src/xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp
Tue Jun 21 12:09:18 2011
@@ -225,6 +225,10 @@ int BinHTTPInputStreamCommon::sendReques
ThrowXMLwithMemMgr1(NetAccessorException,
XMLExcepts::NetAcc_ReadSocket, url.getURLText(), fMemoryManager);
}
+ // connection closed
+ if(ret == 0)
+ break;
+
fBuffer.append(tmpBuf, ret);
fBufferPos = strstr(fBuffer.getRawBuffer(), CRLF2X);
@@ -286,7 +290,7 @@ const XMLCh *BinHTTPInputStreamCommon::g
break;
}
}
- // if the encoding=value entry was not present, check
if we should use a default value
+ // if the charset=value entry was not present, check if
we should use a default value
if(fEncoding==0 && tokens->size()>0)
{
const XMLCh szTextSlash[] = { chLatin_t,
chLatin_e, chLatin_x, chLatin_t, chForwardSlash, chNull };
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]