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

Diff for /pegasus/src/Pegasus/Common/HTTPConnection.cpp between version 1.101 and 1.102

version 1.101, 2005/08/14 00:54:43 version 1.102, 2005/08/19 00:24:32
Line 226 
Line 226 
     _outputMessageQueue(outputMessageQueue),     _outputMessageQueue(outputMessageQueue),
     _contentOffset(-1),     _contentOffset(-1),
     _contentLength(-1),     _contentLength(-1),
     _connectionClosePending(false)      _connectionClosePending(false),
       _acceptPending(false)
 { {
     PEG_METHOD_ENTER(TRC_HTTP, "HTTPConnection::HTTPConnection");     PEG_METHOD_ENTER(TRC_HTTP, "HTTPConnection::HTTPConnection");
  
Line 1643 
Line 1644 
     static const char func[] = "HTTPConnection::_handleReadEvent()";     static const char func[] = "HTTPConnection::_handleReadEvent()";
     PEG_METHOD_ENTER(TRC_HTTP, func);     PEG_METHOD_ENTER(TRC_HTTP, func);
  
       if (_acceptPending)
       {
           PEGASUS_ASSERT(!_isClient());
   
           Sint32 socketAcceptStatus = _socket->accept();
   
           if (socketAcceptStatus < 0)
           {
               PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
                   "HTTPConnection: SSL_accept() failed");
               _closeConnection();
               PEG_METHOD_EXIT();
               return;
           }
           else if (socketAcceptStatus == 0)
           {
               // Not enough data yet to complete the SSL handshake
               PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL2,
                   "HTTPConnection: SSL_accept() pending");
               PEG_METHOD_EXIT();
               return;
           }
           else
           {
               // Add SSL verification information to the authentication info
               if (_socket->isSecure() &&
                   _socket->isPeerVerificationEnabled() &&
                   _socket->isCertificateVerified())
               {
                   _authInfo->setAuthStatus(AuthenticationInfoRep::AUTHENTICATED);
                   _authInfo->setAuthType(AuthenticationInfoRep::AUTH_TYPE_SSL);
                   _authInfo->setClientCertificate(_socket->getPeerCertificate());
               }
   
               // Go back to the select() and wait for data on the connection
               _acceptPending = false;
               PEG_METHOD_EXIT();
               return;
           }
       }
   
     // -- Append all data waiting on socket to incoming buffer:     // -- Append all data waiting on socket to incoming buffer:
  
     String httpStatus;     String httpStatus;


Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2