[Bug 40169] New: Recognize INTERNET_FLAG_SECURE with INTERNET_INVALID_PORT_NUMBER in GetHttpConnection

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Feb 17 11:02:54 CST 2016


https://bugs.winehq.org/show_bug.cgi?id=40169

            Bug ID: 40169
           Summary: Recognize INTERNET_FLAG_SECURE with
                    INTERNET_INVALID_PORT_NUMBER in GetHttpConnection
           Product: Wine
           Version: 1.9.3
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wininet
          Assignee: wine-bugs at winehq.org
          Reporter: PhoneixSegovia at gmail.com
      Distribution: ---

When using GetHttpConnection with the port INTERNET_INVALID_PORT_NUMBER and the
flag INTERNET_FLAG_SECURE wininet interpret incorrectly and try to connect to
port 80.

For example this is the code used in the windows program to make a request:



#include "afxinet.h"

BOOL servicioPost(const char* actionPage, CString& strFormData, CString&
mensajeError, CString& contenidoFichero){
    CString strHeaders = _T("Content-Type: application/x-www-form-urlencoded");
    CHttpConnection* pConnection = NULL;
    CHttpFile*  pFile = NULL;
    BOOL retorno = FALSE;
    TRY{
        CInternetSession session;
        pConnection = session.GetHttpConnection(DOMINIO_SERVIDOR,
INTERNET_FLAG_SECURE,INTERNET_INVALID_PORT_NUMBER, NULL, NULL);
        if (pConnection){    
            pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,
actionPage, NULL, 1, NULL, NULL, INTERNET_FLAG_SECURE);
            if (pFile){
                if (pFile->SendRequest(strHeaders,
(LPVOID)(LPCTSTR)strFormData, strFormData.GetLength())){
                    retorno = TRUE;
                    // Make another stuff
                }
            }
        }
    }
    CATCH_ALL(e){
        char mensaje[100];
        e->GetErrorMessage(mensaje, 100);
        mensajeError = "Error Wininet: ";
        mensajeError += mensaje;
    }
    END_CATCH_ALL

    if (pConnection)delete pConnection;//don't skip
    if (pFile)delete pFile;//don't skip

    return retorno;
}

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list