xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cargi...@apache.org
Subject cvs commit: xml-xerces/c/src/xercesc/util/NetAccessors/Socket UnixHTTPURLInputStream.cpp
Date Wed, 11 Feb 2004 12:42:22 GMT
cargilld    2004/02/11 04:42:22

  Modified:    c/src/xercesc/util/NetAccessors/Socket
                        UnixHTTPURLInputStream.cpp
  Log:
  Fix for bug 25541.
  
  Revision  Changes    Path
  1.16      +19 -9     xml-xerces/c/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp
  
  Index: UnixHTTPURLInputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- UnixHTTPURLInputStream.cpp	29 Jan 2004 11:51:20 -0000	1.15
  +++ UnixHTTPURLInputStream.cpp	11 Feb 2004 12:42:22 -0000	1.16
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.16  2004/02/11 12:42:22  cargilld
  + * Fix for bug 25541.
  + *
    * Revision 1.15  2004/01/29 11:51:20  cargilld
    * Code cleanup changes to get rid of various compiler diagnostic messages.
    *
  @@ -251,15 +254,20 @@
       XMLTranscoder* trans = XMLPlatformUtils::fgTransService->makeNewTranscoderFor("ISO8859-1",
failReason, blockSize, fMemoryManager);
       trans->transcodeTo(hostName, transSize, (unsigned char *) hostNameAsASCII, transSize,
charsEaten, XMLTranscoder::UnRep_Throw);
   
  -    transSize = XMLString::stringLen(path)+1;
  -    char*               pathAsASCII = (char*) fMemoryManager->allocate
  -    (
  -        (transSize+1) * sizeof(char)
  -    );//new char[transSize+1];
  -    ArrayJanitor<char>     janBuf3(pathAsASCII, fMemoryManager);
  -    trans->transcodeTo(path, transSize, (unsigned char *) pathAsASCII, transSize, charsEaten,
XMLTranscoder::UnRep_Throw);
  +    char*               pathAsASCII = 0;
  +    ArrayJanitor<char>  janBuf3(pathAsASCII, fMemoryManager);
  +    if (path)
  +    {
  +        transSize = XMLString::stringLen(path)+1;
  +        pathAsASCII = (char*) fMemoryManager->allocate
  +        (
  +            (transSize+1) * sizeof(char)
  +        );//new char[transSize+1];        
  +        trans->transcodeTo(path, transSize, (unsigned char *) pathAsASCII, transSize,
charsEaten, XMLTranscoder::UnRep_Throw);
  +    }
   
       char*               fragmentAsASCII = 0;
  +    ArrayJanitor<char>  janBuf4(fragmentAsASCII, fMemoryManager);
       if (fragment)
       {
           transSize = XMLString::stringLen(fragment)+1;
  @@ -267,7 +275,6 @@
           (
               (transSize+1) * sizeof(char)
           );//new char[transSize+1];
  -        ArrayJanitor<char>  janBuf4(fragmentAsASCII, fMemoryManager);
           trans->transcodeTo(fragment, transSize, (unsigned char *) fragmentAsASCII, transSize,
charsEaten, XMLTranscoder::UnRep_Throw);
       }
   
  @@ -347,7 +354,10 @@
       // To do:  We should really support http 1.1.  This implementation
       //         is weak.
       strcpy(fBuffer, GET);
  -    strcat(fBuffer, pathAsASCII);
  +    if (pathAsASCII != 0)
  +    {
  +         strcat(fBuffer, pathAsASCII);
  +    }
   
       if (queryAsASCII != 0)
       {		
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org


Mime
View raw message