List for cgit developers and users
 help / color / mirror / Atom feed
From: DLange at debian.org (Daniel Lange)
Subject: cgit cache wrong content response http ./. https
Date: Tue, 27 Nov 2018 16:34:01 +0100	[thread overview]
Message-ID: <18fa7997-565d-feae-28b0-afbdcd785225@debian.org> (raw)

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


                 reply	other threads:[~2018-11-27 15:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18fa7997-565d-feae-28b0-afbdcd785225@debian.org \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).