Commit f2aef4cb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Correctly handle BINDF_NEEDFILE flag in http protocol.

parent 2b3c115a
...@@ -419,6 +419,8 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl ...@@ -419,6 +419,8 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
if (This->grfBINDF & BINDF_NOWRITECACHE) if (This->grfBINDF & BINDF_NOWRITECACHE)
request_flags |= INTERNET_FLAG_NO_CACHE_WRITE; 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 ? This->request = HttpOpenRequestW(This->connect, This->bind_info.dwBindVerb < BINDVERB_CUSTOM ?
wszBindVerb[This->bind_info.dwBindVerb] : wszBindVerb[This->bind_info.dwBindVerb] :
This->bind_info.szCustomVerb, This->bind_info.szCustomVerb,
...@@ -656,6 +658,21 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA ...@@ -656,6 +658,21 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
This->content_length = atoiW(content_length); 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; This->flags |= FLAG_FIRST_CONTINUE_COMPLETE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment