urlmon: Correctly handle BINDF_NEEDFILE flag in http protocol.
This commit is contained in:
parent
2b3c115ad1
commit
f2aef4cbb9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user