(file) Return to XmlWriter.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlWriter.cpp between version 1.40 and 1.41

version 1.40, 2002/04/05 01:21:10 version 1.41, 2002/04/05 05:49:27
Line 478 
Line 478 
 //     Returns error response message in the following format: //     Returns error response message in the following format:
 // //
 //        HTTP/1.1 400 Bad Request  (using specified status code) //        HTTP/1.1 400 Bad Request  (using specified status code)
 //        CIMError: <error type>    (only if specified by caller)  //        CIMError: <error type>         (if specified by caller)
 //        Content-Length: 123       (using the given content length, if not 0)  //        PGErrorDetail: <error text>    (if specified by caller)
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
Line 487 
Line 487 
     Array<Sint8>& out,     Array<Sint8>& out,
     const String& status,     const String& status,
     const String& cimError,     const String& cimError,
     Uint32 contentLength)      const String& errorDetail)
 { {
     out << "HTTP/1.1 " << status << "\r\n";     out << "HTTP/1.1 " << status << "\r\n";
     if (cimError != String::EMPTY)     if (cimError != String::EMPTY)
     {     {
         out << "CIMError: " << cimError << "\r\n";         out << "CIMError: " << cimError << "\r\n";
     }     }
     if (contentLength != 0)      if (errorDetail != String::EMPTY)
     {     {
         out << "Content-Length: " << contentLength << "\r\n";          // ATTN-RK-P3-20020404: It is critical that this text not contain '\n'
           // ATTN-RK-P3-20020404: Need to encode this value properly.  (See
           // CIM/HTTP Specification section 3.3.2
           out << "PGErrorDetail: " << errorDetail << "\r\n";
     }     }
     out << "\r\n";     out << "\r\n";
 } }
Line 1033 
Line 1036 
 Array<Sint8> XmlWriter::formatHttpErrorRspMessage( Array<Sint8> XmlWriter::formatHttpErrorRspMessage(
     const String& status,     const String& status,
     const String& cimError,     const String& cimError,
     const String& messageBody)      const String& errorDetail)
 { {
     Array<Sint8> out;     Array<Sint8> out;
     Array<Sint8> tmp;  
  
     if (messageBody != String::EMPTY)      appendHttpErrorResponseHeader(out, status, cimError, errorDetail);
     {  
         out << messageBody << "\n";  
     }  
     appendHttpErrorResponseHeader(tmp, status, cimError, out.size());  
     tmp << out;  
  
     return tmp;      return out;
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------


Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2