Opened 4 months ago

Last modified 4 months ago

#36397 closed Bug

Server ignores 'Last-Modified' date (Debian#926074) — at Version 2

Reported by: Christian Buhtz Owned by:
Component: contrib.syndication Version: 4.2
Severity: Normal Keywords:
Cc: Colin Watson Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Christian Buhtz)

Hello,
First please take my apologize for writing such a broad ticket. But others, with more intel, I asked, didn't.

This is related to a (6 year old) Debian bug ticket: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926074
In short: The modified date is ignored by the server.

The Debian folks telling me that Django is somehow involved and there should go a bug ticket and fix.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926074#10

I can not tell because I lack of deeper understanding of the underlying technology.

I do have minimal working example demonstrating the problem with the Debian server.

>>> url = 'https://tracker.debian.org/pkg/feedparser/rss'
>>> import feedparser as fp
>>> a = fp.parse(url)
>>> import json
>>> print(json.dumps(a.headers, indent=4))
{
    "X-Clacks-Overhead": "GNU Terry Pratchett",
    "X-Xss-Protection": "1",
    "Transfer-Encoding": "chunked",
    "Last-Modified": "Sat, 30 Mar 2019 13:06:51 GMT",
    "Public-Key-Pins": "pin-
sha256=\"M9Wyk2x6hLne/VkyJWFx33+LB8s+kAaMbO49fnm5fEY=\"; pin-
sha256=\"ZsBWn0bekrum/1CJtBlg5yZ2eqRywN6YwGeBS31nH+s=\"; max-age=5184000",
    "Strict-Transport-Security": "max-age=15552000",
    "Content-Type": "application/rss+xml; charset=utf-8",
    "X-Content-Type-Options": "nosniff",
    "Connection": "close",
    "Referrer-Policy": "same-origin",
    "Content-Encoding": "gzip",
    "X-Frame-Options": "sameorigin",
    "Server": "Apache",
    "Vary": "Cookie,Accept-Encoding",
    "Date": "Sun, 31 Mar 2019 11:11:03 GMT"
}
>>> a.modified
'Sat, 30 Mar 2019 13:06:51 GMT'
>>> b = fp.parse(url, modified=a.modified)
>>> len(a.entries)
30
>>> len(b.entries)
30

I would expect "b.entries" should be (near) 0.

I also can not tell wich version of Django is used by Debian.

Maybe you can give some comments in the Debian ticket?

Regards,
Christian

Change History (1)

comment:2 by Christian Buhtz, 4 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top