Entries should include ETag information

Bug #273176 reported by Leonard Richardson
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Leonard Richardson

Bug Description

If you get api.launchpad.net/beta/bugs/1, Launchpad serves an ETag HTTP header derived from the current state of the bug. You can use this to make a conditional request in the future. But if you get api.launchpad.net/beta/bugs, and bug #1 happens to be in the collection, you don't get an ETag for bug #1. The HTTP header doesn't work because the resource is the collection, not any specific entry.

I propose putting an ETag in the representation of an entry. Clients like launchpadlib that have special knowledge of entries (knowledge as basic as 'collections contain entries') can be programmed to look inside an entry, grab the ETag, and treat it as an ETag obtained from the HTTP header. It can make conditional requests on that entry in the future.

This has a server element and a launchpadlib element. The launchpadlib element is tricky because httplib2 cached HTTP responses and gets its ETags from there. We might be able to cache each entry individually with a fake HTTP response that only includes ETag.

Changed in launchpad-foundations:
importance: Undecided → High
milestone: none → 2.1.11
status: New → Triaged
Changed in launchpad-foundations:
assignee: nobody → leonardr
milestone: 2.1.11 → 2.1.12
Changed in launchpad-foundations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.