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

Diff for /pegasus/src/Pegasus/Server/HTTPAuthenticatorDelegator.cpp between version 1.55 and 1.56

version 1.55, 2005/11/22 19:33:27 version 1.56, 2005/11/22 21:07:16
Line 22 
Line 22 
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN _HTTP_HEADER_CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //============================================================================== //==============================================================================
Line 58 
Line 58 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   static const String _HTTP_VERSION_1_0 = "HTTP/1.0";
   
   static const String _HTTP_METHOD_MPOST = "M-POST";
   static const String _HTTP_METHOD = "POST";
   
   static const String _HTTP_HEADER_CIMEXPORT = "CIMExport";
   static const String _HTTP_HEADER_CONNECTION = "Connection";
   static const String _HTTP_HEADER_CIMOPERATION = "CIMOperation";
   static const String _HTTP_HEADER_ACCEPT_LANGUAGE = "Accept-Language";
   static const String _HTTP_HEADER_CONTENT_LANGUAGE = "Content-Language";
   static const String _HTTP_HEADER_AUTHORIZATION = "Authorization";
   static const String _HTTP_HEADER_PEGASUSAUTHORIZATION = "PegasusAuthorization";
   
   static const String _CONFIG_PARAM_ENABLEAUTHENTICATION = "enableAuthentication";
   
   static const String _TRUE = "true";
  
 HTTPAuthenticatorDelegator::HTTPAuthenticatorDelegator( HTTPAuthenticatorDelegator::HTTPAuthenticatorDelegator(
     Uint32 operationMessageQueueId,     Uint32 operationMessageQueueId,
Line 263 
Line 279 
     //     //
     // Check for Connection: Close     // Check for Connection: Close
     //     //
     if(HTTPMessage::lookupHeader(headers, "Connection", connectClose, false))      if(HTTPMessage::lookupHeader(
           headers, _HTTP_HEADER_CONNECTION, connectClose, false))
     {     {
        if (String::equalNoCase(connectClose, "Close"))        if (String::equalNoCase(connectClose, "Close"))
        {        {
Line 290 
Line 307 
         String operation;         String operation;
  
         if ( HTTPMessage::lookupHeader(         if ( HTTPMessage::lookupHeader(
              headers, "CIMOperation", operation, true) )               headers, _HTTP_HEADER_CIMOPERATION, operation, true) )
         {         {
             //             //
             //  CIMOperation requests are not supported on the export connection             //  CIMOperation requests are not supported on the export connection
Line 315 
Line 332 
         // is authenticated by client certificate verification.         // is authenticated by client certificate verification.
         //         //
         if ( HTTPMessage::lookupHeader(         if ( HTTPMessage::lookupHeader(
              headers, "CIMExport", operation, true) )               headers, _HTTP_HEADER_CIMEXPORT, operation, true) )
         {         {
             PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL3,             PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL3,
                     "CIMExport request received on export connection");                     "CIMExport request received on export connection");
Line 372 
Line 389 
     Boolean authenticated = false;     Boolean authenticated = false;
  
     if (String::equal(     if (String::equal(
         configManager->getCurrentValue("enableAuthentication"), "true"))          configManager->getCurrentValue(
               _CONFIG_PARAM_ENABLEAUTHENTICATION), _TRUE))
     {     {
         enableAuthentication = true;         enableAuthentication = true;
  
Line 578 
Line 596 
                 String acceptLanguageHeader;                 String acceptLanguageHeader;
                 if (HTTPMessage::lookupHeader(                 if (HTTPMessage::lookupHeader(
                       headers,                       headers,
                   "Accept-Language",                        _HTTP_HEADER_ACCEPT_LANGUAGE,
                       acceptLanguageHeader,                       acceptLanguageHeader,
                   false) == true)                   false) == true)
             {             {
Line 590 
Line 608 
                 String contentLanguageHeader;                 String contentLanguageHeader;
                 if (HTTPMessage::lookupHeader(                 if (HTTPMessage::lookupHeader(
                       headers,                       headers,
                   "Content-Language",                        _HTTP_HEADER_CONTENT_LANGUAGE,
                       contentLanguageHeader,                       contentLanguageHeader,
                   false) == true)                   false) == true)
             {             {
Line 633 
Line 651 
     //     //
     //  Set HTTP method for the request     //  Set HTTP method for the request
     //     //
     if (methodName == "M-POST")      if (methodName == _HTTP_METHOD_MPOST)
     {     {
         httpMethod = HTTP_METHOD_M_POST;         httpMethod = HTTP_METHOD_M_POST;
     }     }
  
     if (methodName != "M-POST" && methodName != "POST")      if (methodName != _HTTP_METHOD_MPOST && methodName != _HTTP_METHOD)
     {     {
         // Only POST and M-POST are implemented by this server         // Only POST and M-POST are implemented by this server
         _sendHttpError(         _sendHttpError(
Line 649 
Line 667 
             closeConnect);             closeConnect);
     }     }
     else if ((httpMethod == HTTP_METHOD_M_POST) &&     else if ((httpMethod == HTTP_METHOD_M_POST) &&
              (httpVersion == "HTTP/1.0"))               (httpVersion == _HTTP_VERSION_1_0))
     {     {
         //         //
         //  M-POST method is not valid with version 1.0         //  M-POST method is not valid with version 1.0
Line 666 
Line 684 
         //         //
         // Process M-POST and POST messages:         // Process M-POST and POST messages:
         //         //
         Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,  
             "HTTPAuthenticatorDelegator - M-POST/POST processing start");          PEG_LOGGER_TRACE((
               Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
               "HTTPAuthenticatorDelegator - M-POST/POST processing start"));
  
         httpMessage->message.append('\0');         httpMessage->message.append('\0');
  
Line 678 
Line 698 
         //         //
         String authorization = String::EMPTY;         String authorization = String::EMPTY;
  
         if ( HTTPMessage::lookupHeader(          if ( HTTPMessage::lookupHeader(headers,
              headers, "PegasusAuthorization", authorization, false) &&              _HTTP_HEADER_PEGASUSAUTHORIZATION, authorization, false) &&
              enableAuthentication              enableAuthentication
            )            )
         {         {
Line 749 
Line 769 
 #endif #endif
  
         if ( HTTPMessage::lookupHeader(         if ( HTTPMessage::lookupHeader(
              headers, "Authorization", authorization, false) &&               headers, _HTTP_HEADER_AUTHORIZATION, authorization, false) &&
              enableAuthentication              enableAuthentication
            )            )
         {         {
Line 858 
Line 878 
             String cimOperation;             String cimOperation;
  
             if (HTTPMessage::lookupHeader(             if (HTTPMessage::lookupHeader(
                 headers, "CIMOperation", cimOperation, true))                  headers, _HTTP_HEADER_CIMOPERATION, cimOperation, true))
             {             {
                 Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,                  PEG_LOGGER_TRACE((Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                             "HTTPAuthenticatorDelegator - CIMOperation: $0 ",cimOperation);                              "HTTPAuthenticatorDelegator - CIMOperation: $0 ",cimOperation));
  
                 MessageQueue* queue =                 MessageQueue* queue =
                     MessageQueue::lookup(_operationMessageQueueId);                     MessageQueue::lookup(_operationMessageQueueId);
Line 891 
Line 911 
                 }                 }
             }             }
             else if (HTTPMessage::lookupHeader(             else if (HTTPMessage::lookupHeader(
                 headers, "CIMExport", cimOperation, true))                  headers, _HTTP_HEADER_CIMEXPORT, cimOperation, true))
             {             {
                 Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,                 Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
                             "HTTPAuthenticatorDelegator - CIMExport: $0 ",cimOperation);                             "HTTPAuthenticatorDelegator - CIMExport: $0 ",cimOperation);


Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2