Skip to content

Conversation

@andyleadbetter
Copy link

There is a problem downloading images from Piwigo when the the server is sat behind a reverse proxy that terminates the https client connection, and requests images from Piwigo. The Piwigo server url base is https, but all image urls coming from the backend are http.

Most reverse proxies will redirect a request for the http image on the internet to a https request before hitting the backend. This patch changes the Picasso component to make use of a okhttp3 download agent per an implementation from Jake Wharton https://github.com/JakeWharton/picasso2-okhttp3-downloader/blob/master/LICENSE.txt

The change is actually just 3 lines on top of v1.0.2 release tag. but includes other changes to files from Android Studio.

There are no logic changes in Piwigo to support this, its a straight drop in of a different download engine to the Picasso framework, but this download engine supports graceful 302 & 301 redirects to the https URL returned from the proxy, without needing to handle it in the piwigo code.

andyl added 2 commits December 10, 2020 22:32
…t to follow redirects and 301's through the HTTPS to HTTP redirect at the Letsencrypt gateway
@ramack
Copy link
Contributor

ramack commented Dec 12, 2020

Thanks for your contribution! Before merging I have a few requests:

  • can you create a ticket (if not yet existing) that describes the issue before, instead of writing "There is a problem..." in a PR
  • check whether the issue is still present in the current HEAD of the development
  • rebase your PR on top of the current HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants