Jacek Caban : urlmon: Correctly handle BINDF_NEEDFILE flag in http protocol .
Alexandre Julliard
julliard at winehq.org
Mon Feb 4 08:43:11 CST 2008
Module: wine
Branch: master
Commit: f2aef4cbb9f63ebd3e89dd9f1cafa47e66cbd70a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2aef4cbb9f63ebd3e89dd9f1cafa47e66cbd70a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jan 31 18:18:11 2008 +0100
urlmon: Correctly handle BINDF_NEEDFILE flag in http protocol.
---
dlls/urlmon/http.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index 3056feb..712800d 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -419,6 +419,8 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
if (This->grfBINDF & BINDF_NOWRITECACHE)
request_flags |= INTERNET_FLAG_NO_CACHE_WRITE;
+ if (This->grfBINDF & BINDF_NEEDFILE)
+ request_flags |= INTERNET_FLAG_NEED_FILE;
This->request = HttpOpenRequestW(This->connect, This->bind_info.dwBindVerb < BINDVERB_CUSTOM ?
wszBindVerb[This->bind_info.dwBindVerb] :
This->bind_info.szCustomVerb,
@@ -656,6 +658,21 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
This->content_length = atoiW(content_length);
}
+ if(This->grfBINDF & BINDF_NEEDFILE) {
+ WCHAR cache_file[MAX_PATH];
+ DWORD buflen = sizeof(cache_file);
+
+ if(InternetQueryOptionW(This->request, INTERNET_OPTION_DATAFILE_NAME,
+ cache_file, &buflen))
+ {
+ IInternetProtocolSink_ReportProgress(This->protocol_sink,
+ BINDSTATUS_CACHEFILENAMEAVAILABLE,
+ cache_file);
+ }else {
+ FIXME("Could not get cache file\n");
+ }
+ }
+
This->flags |= FLAG_FIRST_CONTINUE_COMPLETE;
}
More information about the wine-cvs
mailing list