all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Damien Cassou <damien@cassou.me>
Cc: 37319@debbugs.gnu.org
Subject: bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
Date: Sat, 14 Sep 2019 15:57:05 +0200	[thread overview]
Message-ID: <878sqr7zgu.fsf@gnus.org> (raw)
In-Reply-To: <87blvxkhud.fsf@cassou.me> (Damien Cassou's message of "Fri, 06 Sep 2019 09:24:26 +0200")

Damien Cassou <damien@cassou.me> writes:

> I would like to use shr to render an HTML document with images. These
> images are only accessible when logged in, so I need cookies to be sent
> by shr. Unfortunately, `shr-tag-img` explicitly pass t to
> INHIBIT-COOKIES when calling `url-queue-retrieve`. Several calls to
> `url-retrieve` in the same file also inhibit cookies.
>
> Why is that so?

It's an artefact from when shr was used mainly for rendering Gnus
articles, I think.

> Can we make that configurable through, e.g., a new option
> `shr-img-inhibit-cookies` or similar?

Yes, I think that sounds fine.  eww, for instance, should (by default)
send cookies when retrieving images, for instance, but it needs to be
tempered by allowing not sending cookies to third-party images and the
like.  The entire eww cookie/referer thing needs a makeover, but that's
a different story.

But, yes, adding a `shr-use-cookies' variable to be bound before calling
`shr-insert-document' would be good.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-09-14 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  7:24 bug#37319: 26.3; shr: Why inhibiting cookies when fetching images? Damien Cassou
2019-09-14 13:57 ` Lars Ingebrigtsen [this message]
2019-09-24 15:49   ` Lars Ingebrigtsen

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=878sqr7zgu.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37319@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.