Publish a JSON representation of a binary file containing metadata
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restful |
Triaged
|
Low
|
Unassigned | ||
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
A cry goes out for a binary file's metadata: URL of the file, size, media type, etc. Currently a GET to the binary file resource redirects to the actual file in the librarian. By examining the HTTP response (to the original request or the redirect request) you can get this metadata, but it would be useful to have a JSON representation of the binary file resource so that clients like launchpadlib can examine this data in the same way they examine other data.
(Alternatively, we could give lazr.restfulclient the ability to introspect on these HTTP responses.)
The JSON representation would only be sent if the client sends 'application/json' in their Accept header. Otherwise they get the redirect. This would cause a slight confusion when the underlying binary file is a JSON document.
Changed in ubuntu: | |
status: | New → Invalid |
Changed in lazr.restful: | |
status: | New → Triaged |
importance: | Undecided → Low |
wgrant asks for this feature, and also asks that it include the MD5 sum and other cryptographic hashes of the file.