diff --git a/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp b/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp index 7fe2f9231567019eabd28275a0df7a6007b92a44..c1dc16b7b5d1e457374df8629b4e3765ff7ff4f6 100644 --- a/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp +++ b/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.8 2002/12/09 09:57:27 gareth + * Fixed compile error by adding private member. Not very efficient. Should be looked at again. + * * Revision 1.7 2002/12/06 16:43:33 tng * Fix the error messages thrown from net accessor module. * @@ -138,7 +141,12 @@ XERCES_CPP_NAMESPACE_BEGIN UnixHTTPURLInputStream::UnixHTTPURLInputStream(const XMLURL& urlSource) : fSocket(0) , fBytesProcessed(0) + , fURLText(0) { + + //REVISIT inefficient - this is used by the error reporting in readBytes. Do we need it? + fURLText = XMLString::replicate(urlSource.getURLText()); + // // Pull all of the parts of the URL out of th urlSource object, and transcode them // and transcode them back to ASCII. @@ -316,6 +324,7 @@ UnixHTTPURLInputStream::~UnixHTTPURLInputStream() { shutdown(fSocket, 2); close(fSocket); + delete[] fURLText; } @@ -340,7 +349,7 @@ unsigned int UnixHTTPURLInputStream::readBytes(XMLByte* const toFill len = read(fSocket, (void *) toFill, maxToRead); if (len == -1) { - ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_ReadSocket, urlSource.getURLText()); + ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_ReadSocket, fURLText); } } diff --git a/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp b/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp index 6af41303da926b1b3f2d7f323d286e4ecd6e8f99..18ac3a0d211d3cdd9834b284d3312c19b7daa704 100644 --- a/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp +++ b/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.3 2002/12/09 09:57:27 gareth + * Fixed compile error by adding private member. Not very efficient. Should be looked at again. + * * Revision 1.2 2002/11/04 15:11:38 tng * C++ Namespace Support. * @@ -127,6 +130,8 @@ private : // fBufferPos, fBufferEnd // Pointers into fBuffer, showing start and end+1 of content // that readBytes must return. + // fURLText + // Full URL text for error reporting // ----------------------------------------------------------------------- int fSocket; @@ -134,6 +139,7 @@ private : char fBuffer[4000]; char * fBufferEnd; char * fBufferPos; + XMLCh * fURLText; }; // UnixHTTPURLInputStream