When I run the URLConnection demos of 2019r1.1, ReceivingProgressed shows correct values when it fires.
But inside an own app using a Send(“POST”) with an XML into a folderitem, the event will only return -1 on macOS and 0 on Windows, whereas bytesReceived is incremented correctly. Any ideas what I might be doing wrong?
Thanks a lot!
Does the server include a Content-Length header? I suspect the socket needs that to know how much data is coming. Otherwise it just has to wait for the connection to close.
That could indeed be the reason. Bad thing is the servers programmer is uncertain how to teach the PHP class he uses such tricks. Do you know of any place besides stack overflow (where I usually spend hours to find the right answer due to the layout mainly) where he could find some information?
For php its pretty simple:
$response = hello world;
header(Content-Length: . strlen($data));
echo $data;
BUT I suspect this isnt the issue, because the header is added on normal php requests anyway. Could there be a proxy between you and the server?
Thanks again, Thom!
I found a section about determining body size when Content-Length is not supported in the HTTP docs and we are trying to find a workable way by that. I am glad I usually dont have to dig into server stuff deeply
P.S.: No proxy.