(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.29 and 1.30

version 1.29, 2003/11/07 19:18:46 version 1.30, 2003/11/12 02:21:59
Line 145 
Line 145 
 } }
  
  
 void HTTPAuthenticatorDelegator::_sendError(  void HTTPAuthenticatorDelegator::_sendHttpError(
     Uint32 queueId,     Uint32 queueId,
     const String errorMessage)      const String& status,
       const String& cimError,
       const String& pegasusError)
 { {
     PEG_METHOD_ENTER(TRC_HTTP,     PEG_METHOD_ENTER(TRC_HTTP,
         "HTTPAuthenticatorDelegator::_sendError");          "HTTPAuthenticatorDelegator::_sendHttpError");
  
     //     //
     // build error response message     // build error response message
     //     //
  
     Array<Sint8> message;     Array<Sint8> message;
     //      message = XmlWriter::formatHttpErrorRspMessage(
     //ATTN: Need an ErrorResponseHeader() in XmlWriter          status,
     //          cimError,
     //message = XmlWriter::formatErrorResponseHeader(errorMessage);          pegasusError);
  
     _sendResponse(queueId, message);     _sendResponse(queueId, message);
  
Line 277 
Line 279 
     if (methodName != "M-POST" && methodName != "POST")     if (methodName != "M-POST" && methodName != "POST")
     {     {
         // Only POST and M-POST are implemented by this server         // Only POST and M-POST are implemented by this server
         Array<Sint8> message;          _sendHttpError(queueId,
         message = XmlWriter::formatHttpErrorRspMessage(  
             HTTP_STATUS_NOTIMPLEMENTED);             HTTP_STATUS_NOTIMPLEMENTED);
         _sendResponse(queueId, message);  
     }     }
     else if ((httpMethod == HTTP_METHOD_M_POST) &&     else if ((httpMethod == HTTP_METHOD_M_POST) &&
              (httpVersion == "HTTP/1.0"))              (httpVersion == "HTTP/1.0"))
Line 288 
Line 288 
         //         //
         //  M-POST method is not valid with version 1.0         //  M-POST method is not valid with version 1.0
         //         //
         Array<Sint8> message;          _sendHttpError(queueId,
         message = XmlWriter::formatHttpErrorRspMessage(  
             HTTP_STATUS_BADREQUEST);             HTTP_STATUS_BADREQUEST);
         _sendResponse(queueId, message);  
     }     }
     else     else
     {     {
Line 338 
Line 336 
                     }                     }
                     else                     else
                     {                     {
                         _sendError(queueId, "Invalid Request");                          _sendHttpError(queueId,
                                          HTTP_STATUS_BADREQUEST,
                                          String::EMPTY,
                                          "Authorization header error");
                     }                     }
  
                     PEG_METHOD_EXIT();                     PEG_METHOD_EXIT();
Line 347 
Line 348 
             }             }
             catch (CannotOpenFile &cof)             catch (CannotOpenFile &cof)
             {             {
                 Array<Sint8> errMsg;                  _sendHttpError(queueId,
                 errMsg = XmlWriter::formatHttpErrorRspMessage(  
                    HTTP_STATUS_INTERNALSERVERERROR);                    HTTP_STATUS_INTERNALSERVERERROR);
                 _sendResponse(queueId, errMsg);  
                 PEG_METHOD_EXIT();                 PEG_METHOD_EXIT();
                 return;                 return;
  
Line 402 
Line 401 
                     }                     }
                     else                     else
                     {                     {
                         _sendError(queueId, "Invalid Request");                          _sendHttpError(queueId,
                                          HTTP_STATUS_BADREQUEST,
                                          String::EMPTY,
                                          "Authorization header error");
                     }                     }
  
                     PEG_METHOD_EXIT();                     PEG_METHOD_EXIT();
Line 437 
Line 439 
                     }                     }
                     else                     else
                     {                     {
                         _sendError(queueId, "Invalid Request");                          _sendHttpError(queueId,
                                          HTTP_STATUS_BADREQUEST,
                                          String::EMPTY,
                                          "Authorization header error");
                     }                     }
  
                     PEG_METHOD_EXIT();                     PEG_METHOD_EXIT();
Line 616 
Line 621 
                    catch(exception & e)                    catch(exception & e)
                      {                      {
                        delete httpMessage;                        delete httpMessage;
                        Array<Sint8> message;                         _sendHttpError(queueId,
                        message = XmlWriter::formatHttpErrorRspMessage(HTTP_STATUS_REQUEST_TOO_LARGE);                                        HTTP_STATUS_REQUEST_TOO_LARGE);
                        _sendResponse(queueId, message);  
                        PEG_METHOD_EXIT();                        PEG_METHOD_EXIT();
                        deleteMessage = false;                        deleteMessage = false;
                        return;                        return;
Line 669 
Line 673 
                 // without the CIMError header since this request must not be                 // without the CIMError header since this request must not be
                 // processed as a CIM request.                 // processed as a CIM request.
  
                 Array<Sint8> message;                  _sendHttpError(queueId,
                 message = XmlWriter::formatHttpErrorRspMessage(  
                     HTTP_STATUS_BADREQUEST);                     HTTP_STATUS_BADREQUEST);
                 _sendResponse(queueId, message);  
                 PEG_METHOD_EXIT();                 PEG_METHOD_EXIT();
                 return;                 return;
             } // bad request             } // bad request
Line 693 
Line 695 
             }             }
             else             else
             {             {
                 _sendError(queueId, "Invalid Request");                  _sendHttpError(queueId,
                                  HTTP_STATUS_BADREQUEST,
                                  String::EMPTY,
                                  "Authorization header error");
             }             }
         }         }
     } // M-POST and POST processing     } // M-POST and POST processing


Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2