handle 'cleaned' remote URLs

If imageproxy runs behind an http.ServeMux or certain web servers, the
double slash in the remote URL will get collapsed down to a single
slash.  (e.g. http://example.com/ becomes http:/example.com/).  This
is now handled by imageproxy directly.

Ref #65
This commit is contained in:
Will Norris 2016-05-26 13:22:17 -07:00
parent a71584a63c
commit a1af9aa8e2
3 changed files with 10 additions and 4 deletions

View file

@ -35,10 +35,6 @@ import (
)
// Proxy serves image requests.
//
// Note that a Proxy should not be run behind a http.ServeMux, since the
// ServeMux aggressively cleans URLs and removes the double slash in the
// embedded request URL.
type Proxy struct {
Client *http.Client // client used to fetch remote URLs
Cache Cache // cache used to cache responses