bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?


From: Lars Ingebrigtsen
Subject: bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
Date: Sat, 14 Sep 2019 15:57:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]