~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/engine/httpcontrolsocket.cpp

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
297
297
        wxASSERT(GetCurrentCommandId() == cmd_connect);
298
298
 
299
299
        CHttpConnectOpData *pData = static_cast<CHttpConnectOpData *>(m_pCurOpData);
300
 
        
 
300
 
301
301
        if (pData->tls)
302
302
        {
303
303
                if (!m_pTlsSocket)
460
460
        if (pData->m_newLocation == _T(""))
461
461
        {
462
462
                if (m_pCurrentServer->GetProtocol() == HTTPS)
463
 
                        location = _T("https://") + m_pCurrentServer->FormatHost() + pData->remotePath.FormatFilename(pData->remoteFile).c_str();
 
463
                        location = _T("https://") + wxString(m_pCurrentServer->FormatHost()) + wxString(pData->remotePath.FormatFilename(pData->remoteFile).c_str());
464
464
                else
465
 
                        location = _T("http://") + m_pCurrentServer->FormatHost() + pData->remotePath.FormatFilename(pData->remoteFile).c_str();
 
465
                        location = _T("http://") + wxString(m_pCurrentServer->FormatHost()) + wxString(pData->remotePath.FormatFilename(pData->remoteFile).c_str());
466
466
                hostWithPort = wxString::Format(_T("%s:%d"), m_pCurrentServer->FormatHost(true).c_str(), m_pCurrentServer->GetPort());
467
467
        }
468
468
        else
522
522
 
523
523
        if (res && res != EINPROGRESS)
524
524
                return ResetOperation(FZ_REPLY_ERROR);
525
 
        
 
525
 
526
526
        return FZ_REPLY_WOULDBLOCK;
527
527
}
528
528
 
580
580
        // We do just the neccessary parsing and silently ignore most header fields
581
581
        // Redirects are supported though if the server sends the Location field.
582
582
 
583
 
        while (true)
 
583
        for (;;)
584
584
        {
585
585
                // Find line ending
586
586
                unsigned int i = 0;
793
793
        char* p = m_pRecvBuffer;
794
794
        unsigned int len = m_recvBufferPos;
795
795
 
796
 
        while (true)
 
796
        for (;;)
797
797
        {
798
798
                if (pData->m_chunkData.size != 0)
799
799
                {
805
805
                        if (res != FZ_REPLY_WOULDBLOCK)
806
806
                                return res;
807
807
 
808
 
            pData->m_chunkData.size -= dataLen;
 
808
                        pData->m_chunkData.size -= dataLen;
809
809
                        p += dataLen;
810
810
                        len -= dataLen;
811
811
 
954
954
                ResetOperation(FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED);
955
955
                return;
956
956
        }
957
 
        
 
957
 
958
958
        if (DoReceive() == FZ_REPLY_REDIRECTED)
959
959
                return; // Socket got closed already
960
960