Re: InternetReadFile, FTP and partial buffers
"Krzysztof" == Krzysztof Foltman <kfoltman(a)portal.onet.pl> writes:
Krzysztof> Hi All, In the original WinInet FTP implementation, Krzysztof> InternetReadFile always returns complete buffers, except for Krzysztof> the last block. Some programs (probably ill-behaving ones, Krzysztof> but I wouldn't bet my head on it) rely on that fact, and stop Krzysztof> retrieving the file after the first incomplete block. I met the same problem for the HTTP implementation. The MSG_WAITALL flag sent to recv should always retrieve buffers of the requested size, if possible. Can you please try your problem with the MSG_WAITALL flag instead your patch? Bye -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- Index: wine/dlls/wininet/internet.c =================================================================== RCS file: /home/wine/wine/dlls/wininet/internet.c,v retrieving revision 1.95 diff -u -w -r1.95 internet.c --- wine/dlls/wininet/internet.c 19 Aug 2004 19:02:17 -0000 1.95 +++ wine/dlls/wininet/internet.c 4 Sep 2004 22:09:59 -0000 @@ -1632,7 +1632,7 @@ { case WH_HHTTPREQ: if (!NETCON_recv(&((LPWININETHTTPREQW)lpwh)->netConnection, lpBuffer, - dwNumOfBytesToRead, 0, (int *)dwNumOfBytesRead)) + dwNumOfBytesToRead, MSG_WAITALL, (int *)dwNumOfBytesRead)) { *dwNumOfBytesRead = 0; retval = TRUE; /* Under windows, it seems to return 0 even if nothing was read... */
participants (1)
-
Uwe Bonnes