Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

How to fetch a resource from within a PWP? #9

Closed
iherman opened this issue Mar 9, 2016 · 5 comments
Closed

How to fetch a resource from within a PWP? #9

iherman opened this issue Mar 9, 2016 · 5 comments

Comments

@iherman
Copy link
Member

iherman commented Mar 9, 2016

Given a situation where a PWP is only published packed, e.g., once zipped and once tarred, and a resource is requested, the question is how does this resource get to the end-user.

Proposal: This depends on the configuration of the server. If the server has the implemented functionality to unpack the PWP server-side, it could return the resource immediately. However, if the server can only return the entire package, the PWP processor can see (based on the returned content type) what kind of package is returned when an individual resource is requested, unpack P client-side, and return the resource of the local unpacked P to the reading system.

@iherman
Copy link
Member Author

iherman commented Mar 9, 2016

This may be a purely server setup issue that may not require any specification on the PWP side

@bjdmeest
Copy link
Contributor

@bjdmeest
Copy link
Contributor

Proposal: If a resource within a PWP is requested (e.g., http://example.com/pwp/img/mona_lisa.jpg), and the PWP is only published packed, the server will return a 404 (cfr. normal Web standards).
The server SHOULD also return a HTTP Link header to the canonical locator (because the client cannot know whether this should be http://example.com/, http://example.com/pwp/, or http://example.com/pwp/img/).
From there, the client can request the entire PWP, unpack locally, and return mona_lisa.jpg to the reading system.

@iherman
Copy link
Member Author

iherman commented Mar 16, 2016

On 16 Mar 2016, at 08:24, Ben De Meester notifications@github.com wrote:

Proposal: If a resource within a PWP is requested (e.g., http://example.com/pwp/img/mona_lisa.jpg), and the PWP is only published packed, the server will return a 404 (cfr. normal Web standards).
The server SHOULD also return a HTTP Link header to the canonical locator (because the client cannot know whether this should be http://example.com/, http://example.com/pwp/, or http://example.com/pwp/img/).
From there, the client can request the entire PWP, unpack locally, and return mona_lisa.jpg to the reading system.

Algorithmically, this is indeed viable. I am not sure that it is realistic to have it set up that way; there are many resources in a package, and setting up the server accordingly is a non-trivial challenge for the publisher.

@bjdmeest
Copy link
Contributor

Given the discussion on the previous call, I propose to just remove section http://w3c.github.io/dpub-pwp-loc/#resources: if the server cannot return a requested resource, it returns a 404. That's basic Web stuff, and we shouldn't ask anything more at this moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants