wininet: Always create a URL cache entry.
Hans Leidekker
hans at codeweavers.com
Tue Jun 16 04:00:07 CDT 2009
Fixes file downloads in ie7.
-Hans
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 8f9f404..2721427 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -3807,8 +3807,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
}
while (loop_next);
- /* FIXME: Better check, when we have to create the cache file */
- if(bSuccess && (lpwhr->hdr.dwFlags & INTERNET_FLAG_NEED_FILE)) {
+ if(bSuccess) {
WCHAR url[INTERNET_MAX_URL_LENGTH];
WCHAR cacheFileName[MAX_PATH+1];
BOOL b;
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 7aa3575..6b20043 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -1163,11 +1163,11 @@ static void test_http_cache(void)
size = sizeof(file_name);
ret = InternetQueryOptionA(request, INTERNET_OPTION_DATAFILE_NAME, file_name, &size);
- todo_wine ok(ret, "InternetQueryOptionA(INTERNET_OPTION_DATAFILE_NAME) failed %u\n", GetLastError());
+ ok(ret, "InternetQueryOptionA(INTERNET_OPTION_DATAFILE_NAME) failed %u\n", GetLastError());
file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
- todo_wine ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
CloseHandle(file);
ok(InternetCloseHandle(request), "Close request handle failed\n");
More information about the wine-patches
mailing list