[Solved] network problem with api stuff (WinINet)

Windows specific forum
infratec
Always Here
Always Here
Posts: 7667
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

[Solved] network problem with api stuff (WinINet)

Post 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
infratec
Always Here
Always Here
Posts: 7667
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

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

Post 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
Post Reply