Nahor
2004-02-27 22:21:10 UTC
Hi,
I have a little program in VB that uses WinInet to post (POST request)
data on a server through HTTPS.
The first request works fine.
Any following requests that quickly follow (less than ~17s after the
previous request) works fine.
If a request is made more than ~17s after the previous one, it fails.
When I say "fail", the CGI on the server is correctly called but there
is no data in the request (in perl, $ENV{CONTENT_LENGTH} == 0).
A simple C# program that uses WebClient.UploadData() works fine which
indicates that problem is on the client side.
Sniffing the network, I see that WinInet tries to keep the SSL socket
opened and reuses it for the following requests.
However, after ~17s, the server closes the socket on its end but Winet
doesn't seem aware of it. When the next request comes, Wininet tries to
use that socket and fails. It then reopens a new one but somehow, the
POST data doesn't arrives in the CGI.
Is there a way to force WinInet to close its socket when a request is
done? Or is there another solution?
Nahor
I have a little program in VB that uses WinInet to post (POST request)
data on a server through HTTPS.
The first request works fine.
Any following requests that quickly follow (less than ~17s after the
previous request) works fine.
If a request is made more than ~17s after the previous one, it fails.
When I say "fail", the CGI on the server is correctly called but there
is no data in the request (in perl, $ENV{CONTENT_LENGTH} == 0).
A simple C# program that uses WebClient.UploadData() works fine which
indicates that problem is on the client side.
Sniffing the network, I see that WinInet tries to keep the SSL socket
opened and reuses it for the following requests.
However, after ~17s, the server closes the socket on its end but Winet
doesn't seem aware of it. When the next request comes, Wininet tries to
use that socket and fails. It then reopens a new one but somehow, the
POST data doesn't arrives in the CGI.
Is there a way to force WinInet to close its socket when a request is
done? Or is there another solution?
Nahor