-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: Metalink (see RFC 5854) is a standard XML-based format for describing how to download a bunch of files. In addition to providing the URLs, it includes some file-level metadata; for example, file size and checksums. There are several programs available that support metalink (e.g., aria2). Metalink/HTTP (see RFC 6249) is a standard approach for embedding metalink metadata into HTTP response headers. Metalink/HTTP also describes how to link a resource to a corresponding metalink description. A directory is often used to group together related content and sometimes people would like to download all of that related content; i.e., download all files in a directory. Therefore, providing a metalink description of the contents of a directory would allow a client (that supports the format) to download all files from that directory. Modification: Refactor content-negotiation support to make it more modular. Update the GET response of DcacheDirectoryResource to support multiple formats; triggered by content-negotiation or by a query parameter in the URL. Add the ability to render a directory listing into an XML document that follows the metalink format. NB. This patch provides a valid, working proof-of-concept implementation. There are (deliberately) some limitations; in particular, it a. includes only the immediate children of the directory: there is no recursion, b. simply includes entries each file; in effect, asuming that all files are either public or the client is able to authenticate. The patch also updates the HTML-based directory GET and HEAD responses so they include an HTTP "Link" response header that identifies that directory's corresponding metalink description, as described by RFC 6249. Result: The WebDAV endpoint now provides a metalink description of a directory's (immediate) contents, simplifying the process of downloading files from a directory. The description is available through either HTTP content negotiation or including a query parameter in the URL. The HTML page (describing a directory) also includes a link to the metalink description. Target: master Requires-notes: yes Requires-book: no Patch: https://rb.dcache.org/r/14078/ Acked-by: Tigran Mkrtchyan
- Loading branch information
1 parent
707000c
commit 1f79ce5
Showing
5 changed files
with
486 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.