From mboxrd@z Thu Jan 1 00:00:00 1970 From: DLange at debian.org (Daniel Lange) Date: Tue, 27 Nov 2018 16:34:01 +0100 Subject: cgit cache wrong content response http ./. https Message-ID: <18fa7997-565d-feae-28b0-afbdcd785225@debian.org> Hi, cgit bases the cache slot to use solely on ctx.qry.raw: err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root, ctx.qry.raw, ttl, process_request); Thus running cgit on a website with http:// _and_ https:// results in the wrong schema being returned if the cache content from the "other protocol" is not yet expired and the content contains cgit generated URLs. This is the case for the atom feeds and for the repository home pages where the "Atom feed" URL of the repository commits is contained. The cache key used to select the slot should include the protocol (at least for these pages) to prevent returning the wrong content. Kind regards, Daniel