Conversation
OpenLibrary does redirects, and this allows the actual expected file to be cached.
|
Hello Nicholas. |
|
Of course! Sorry about the delay; the notification got lost in the email! :-) I notice that one of the resolvers, OpenLibrary, doesn't give the correct URL for the cover from the api request. The link it gives returns an HTTP redirect code. On a browser, this isn't an issue - the browser transparently goes through and follows the redirects to the actual cover. The problem comes when you turn on image caching, like we have done. Without this patch, you end up with a text file saying something like, "File relocated". In essence, this patch simply follows the HTTP 301/302 redirect instructions until it gets to the actual book cover image! For instance, searching for the ISBN 0851111955 on openlibrary returns the following cover URL: |
OpenLibrary does redirects, and this allows the actual expected file to be cached.