Page 1 of 1

[Solved] network problem with api stuff (WinINet)

Posted: Wed Jan 29, 2014 8:48 am
by infratec
Hi,

since PB does not support https I had to use API stuff. (WinINet)
In general everything works fine, but ...

If I make one request which results in an answer larger than a specific size I got the error 12150 (ERROR_WINHTTP_HEADER_NOT_FOUND).

Use of wireshark shows that a 'TCP window full' occurs, the transmission is stopped than.
If I use PB build in network stuff it works without problems.

I searched a lot, but didn't found a solution.
I also tried to switch to asynchron, but failed:
After HttpSendRequest_() I get no more events in my handler.

How can I increase the tcp window size using windows API ?
What's the right way for an asynchronous HttpSendRequest_() ?

Btw., it's a PROPFIND request for vcards of an addressbook (CardDAV).
The answer is a long list inside of XML.
If I have more than 25 cards, the error occurs.
With the native PB commands the size doesn't matter.
I can receive more than 3000 cards without problems.
But without https :cry:

Bernd

Re: [Solved] network problem with api stuff (WinINet)

Posted: Wed Jan 29, 2014 10:31 am
by infratec
Hi,

found a solution :!:

I do it now like in PB:
Call InternetReadFile_() as long it returns bytes.This works.

Before I called HttpQueryInfo_() with contentlength before I called InternetReadFile_().

Bernd