15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Two questions about new MFC internet classes

Jim McCabe -- jmccabe@mail.portup.com
Sunday, August 18, 1996

Environment:  Win95, MSVC 4.2

I'm using the new MFC internet classes and have two questions:

First, is it possible to connect to "https://..." sites?  There seems to be
support for "secure http", but AfxParseURL doesn't recognize "https:".
However, it does recognize "shttp:".  Trying to connect to:

   https://swww.etrade.com/cgi-bin/cgitrade/MainMenu

... CHttpFile::SendRequest() returns error 12029 ("cannot connect"), even
though I'm passing INTERNET_FLAG_SECURE to CHttpConnection::OpenRequest().
There is a several-second delay before SendRequest() fails, so it seems to be
sincerely trying to connect to the remote server and not succeeding.  I'm
thinking the problem is due to some difference between "https:" and "shttp:".
Any clues?

Secondly, where can I find out how to send "form data"?  I need to generate
automatic responses to a HTML form.  I can parse the HTML and figure out what
fields need to be sent, I just don't know how to use the "PUT" or "POST"
methods to actually submit the responses.

Thanks,

Jim
jmccabe@mail.portup.com



Mike Blaszczak -- mikeblas@nwlink.com
Tuesday, August 20, 1996

At 11:41 PM 8/18/96 -0400, you wrote:
>Environment:  Win95, MSVC 4.2

>First, is it possible to connect to "https://..." sites?  There seems to be
>support for "secure http", but AfxParseURL doesn't recognize "https:".
>However, it does recognize "shttp:".  Trying to connect to:

>   https://swww.etrade.com/cgi-bin/cgitrade/MainMenu

This is a bug, unfortunately.  It'll be fixed in MFC 4.2a.

>Secondly, where can I find out how to send "form data"?  I need to generate
>automatic responses to a HTML form.  I can parse the HTML and figure out what
>fields need to be sent, I just don't know how to use the "PUT" or "POST"
>methods to actually submit the responses.

Read the HTTP specification. It explains most of the rules.


.B ekiM
http://www.nwlink.com/~mikeblas   <--- trip report central
1995 Honda VFR750F (Serial number 00050!)  4 Corners 1996!
1987 Yamaha FZ700 (damaged)                AMA, HRC, VFROC
     These words are my own: I do not speak for Microsoft.





| Вернуться в корень Архива |