hi
i'm sure it's an obvious question, and it sure has already been answered but the search feature is disabled
so ...
i'm using the wininet classes to send a request, and retrieve the result sent by the server. It works fine until i change the server settings to post to a cgi page ... then my app says it times out
some code if it helps ...
this works :
CInternetSession sess(_T("...");
CHttpConnection* connexion=sess.GetHttpConnection("fr.....net",(INTERNET_PORT)8080,NULL,NULL);
if (connexion!=NULL) {
CHttpFile* hFile=connexion->OpenRequest(
"POST",
"foo1/foo2",
"....net",
1,
NULL,
NULL,
INTERNET_FLAG_EXISTING_CONNECT);
if (hFile)
{
char szBoundary[] = "...";
if ((hFile->AddRequestHeaders("Content-Type: multipart/form-data; boundary=...", HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE)))
{
//put all form datas in pbuffer
//...
if ((hFile->SendRequest(NULL, 0, (LPVOID)pBuffer,nBufferOffset)))
...
}
ok, this is fine. Now i replace the green line with this one and it's not working anymore !!!!
CHttpFile* hFile=connexion->OpenRequest(
"POST",
"cgi-bin/foo1/foo2.cgi",
...);
what am i missing there ?????
i'm sure it's an obvious question, and it sure has already been answered but the search feature is disabled
so ...
i'm using the wininet classes to send a request, and retrieve the result sent by the server. It works fine until i change the server settings to post to a cgi page ... then my app says it times out
some code if it helps ...
this works :
CInternetSession sess(_T("...");
CHttpConnection* connexion=sess.GetHttpConnection("fr.....net",(INTERNET_PORT)8080,NULL,NULL);
if (connexion!=NULL) {
CHttpFile* hFile=connexion->OpenRequest(
"POST",
"foo1/foo2",
"....net",
1,
NULL,
NULL,
INTERNET_FLAG_EXISTING_CONNECT);
if (hFile)
{
char szBoundary[] = "...";
if ((hFile->AddRequestHeaders("Content-Type: multipart/form-data; boundary=...", HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE)))
{
//put all form datas in pbuffer
//...
if ((hFile->SendRequest(NULL, 0, (LPVOID)pBuffer,nBufferOffset)))
...
}
ok, this is fine. Now i replace the green line with this one and it's not working anymore !!!!
CHttpFile* hFile=connexion->OpenRequest(
"POST",
"cgi-bin/foo1/foo2.cgi",
...);
what am i missing there ?????