1

Topic: WinHttp and ICAP server

All greetings! Is ICAP the server. It is necessary to interact and send with it there files. Itself I do not hasten to implement yet ICAP protocol and wanted to take an interest, whether it is possible to use for this purpose WinHttp? As I fluently esteemed in WinHttp algorithm of interaction with the server about the such: WinHttpOpen-> WinHttpConnect-> WinHttpOpenRequest (GET, POST, etc)-> and further ... I need to create the title which under specification ICAP looks approximately so: REQMOD icap://icap-server.net/server? arg=87 ICAP/1.0 Host: icap-server.net Encapsulated: req-hdr=0, req-body=147 POST/origin-resource/form.pl HTTP/1.1 Host: www.origin-server.com Accept: text/html, text/plain Accept-Encoding: compress Pragma: no-cache 1e I am posting this information. 0 I.e. before title POST there is still specific for ICAP a preamble. WinHttpOpenRequest as I understood,  title  with GET, POST, etc, and WinHttpAddRequestHeaders adds the new data after. I.e. I need to create the request and to send it on ICAP the server. Means WinHttp it is possible somehow hands given to do and send? In advance thanks!

2

Re: WinHttp and ICAP server

Hello, - prus - you wrote: P> I.e. before title POST there is still specific for ICAP a preamble. P> WinHttpOpenRequest as I understood,  title  with GET, POST, etc, and WinHttpAddRequestHeaders adds the new data after. P> I.e. me it is necessary to create the request and to send it on ICAP the server. P> means WinHttp it is possible somehow hands given to do and send? On idea, the call chain should be type such (pseudocode): icap = WinHttpOpenRequest ("REQMOD") post = WinHttpOpenRequest ("POST") WinHttpSendRequest (icap) WinHttpWriteData (post)//that from this works? Or both it is necessary?  WinHttpReceiveResponse (icap) WinHttpReceiveResponse (post) But whether digests it WinHttp in the correct image and whether closes a connection after the first send or receive response - , it is necessary to try (to play with keep-alive titles and actively to look in Wireshark).

3

Re: WinHttp and ICAP server

Hello, Mr. Delphist, you wrote: MD> But whether digests it WinHttp in the correct image and whether closes a connection after the first send or receive response - , it is necessary to try (to play with keep-alive titles and actively to look in Wireshark). Yes, I already understood that it is necessary to try. Thanks. Is a variant to make on boost + asio where most all to implement, but wanted at first winapi to try