Module: wine Branch: master Commit: 824a7eed537765012110445b0f62c9bf3e0f1b3d URL: https://source.winehq.org/git/wine.git/?a=commit;h=824a7eed537765012110445b0... Author: Pat Leamon <pat.leamon(a)gmail.com> Date: Thu Mar 10 20:12:26 2022 +0100 mshtml: Implement nsIHttpChannel::IsNoCacheReponse. Signed-off-by: Pat Leamon <pleamonhp(a)yahoo.com.au> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/nsio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index fc6602eddf4..e0b8bedf79c 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1501,10 +1501,16 @@ static nsresult NSAPI nsChannel_IsNoStoreResponse(nsIHttpChannel *iface, cpp_boo static nsresult NSAPI nsChannel_IsNoCacheResponse(nsIHttpChannel *iface, cpp_bool *_retval) { nsChannel *This = impl_from_nsIHttpChannel(iface); + http_header_t *header; - FIXME("(%p)->(%p)\n", This, _retval); + static const WCHAR cache_controlW[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l'}; - return NS_ERROR_NOT_IMPLEMENTED; + TRACE("(%p)->(%p)\n", This, _retval); + + header = find_http_header(&This->response_headers, cache_controlW, ARRAY_SIZE(cache_controlW)); + *_retval = header && !wcsicmp(header->data, L"no-cache"); + /* FIXME: Gecko also checks if max-age is in the past */ + return NS_OK; } static nsresult NSAPI nsChannel_IsPrivateResponse(nsIHttpChannel *iface, cpp_bool *_retval)