mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 12:12:40 +02:00
Fix build with vips <8.6; More verbose "unsupported" errors
This commit is contained in:
@@ -237,9 +237,9 @@ func decodeBase64URL(parts []string) (string, string, error) {
|
||||
|
||||
fullURL := fmt.Sprintf("%s%s", conf.BaseURL, string(imageURL))
|
||||
|
||||
if _, err := url.ParseRequestURI(fullURL); err != nil {
|
||||
return "", "", fmt.Errorf("Invalid image url: %s", fullURL)
|
||||
}
|
||||
// if _, err := url.ParseRequestURI(fullURL); err != nil {
|
||||
// return "", "", fmt.Errorf("Invalid image url: %s", fullURL)
|
||||
// }
|
||||
|
||||
return fullURL, format, nil
|
||||
}
|
||||
@@ -269,9 +269,9 @@ func decodePlainURL(parts []string) (string, string, error) {
|
||||
|
||||
fullURL := fmt.Sprintf("%s%s", conf.BaseURL, unescaped)
|
||||
|
||||
if _, err := url.ParseRequestURI(fullURL); err != nil {
|
||||
return "", "", fmt.Errorf("Invalid image url: %s", fullURL)
|
||||
}
|
||||
// if _, err := url.ParseRequestURI(fullURL); err != nil {
|
||||
// return "", "", fmt.Errorf("Invalid image url: %s", fullURL)
|
||||
// }
|
||||
|
||||
return fullURL, format, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user