unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
@ 2019-09-06  7:24 Damien Cassou
  2019-09-14 13:57 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Cassou @ 2019-09-06  7:24 UTC (permalink / raw)
  To: 37319; +Cc: Lars Magne Ingebrigtsen

Hi,

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? Can we make that configurable through, e.g., a new
option `shr-img-inhibit-cookies` or similar?

Best,

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
  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
  2019-09-24 15:49   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-14 13:57 UTC (permalink / raw)
  To: Damien Cassou; +Cc: 37319

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#37319: 26.3; shr: Why inhibiting cookies when fetching images?
  2019-09-14 13:57 ` Lars Ingebrigtsen
@ 2019-09-24 15:49   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-24 15:49 UTC (permalink / raw)
  To: Damien Cassou; +Cc: 37319

Lars Ingebrigtsen <larsi@gnus.org> writes:

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

I've now added a `shr-cookie-policy' variable to the trunk.

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-24 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-09-24 15:49   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).