|
@@ -12,7 +12,6 @@ import (
|
|
"errors"
|
|
"errors"
|
|
"fmt"
|
|
"fmt"
|
|
"net/http"
|
|
"net/http"
|
|
- "net/url"
|
|
|
|
"regexp"
|
|
"regexp"
|
|
"strconv"
|
|
"strconv"
|
|
"strings"
|
|
"strings"
|
|
@@ -134,7 +133,6 @@ const (
|
|
var (
|
|
var (
|
|
errInvalidURLEncoding = errors.New("Invalid url encoding")
|
|
errInvalidURLEncoding = errors.New("Invalid url encoding")
|
|
errInvalidPath = errors.New("Invalid path")
|
|
errInvalidPath = errors.New("Invalid path")
|
|
- errInvalidImageURL = errors.New("Invalid image url")
|
|
|
|
errResultingImageFormatIsNotSupported = errors.New("Resulting image format is not supported")
|
|
errResultingImageFormatIsNotSupported = errors.New("Resulting image format is not supported")
|
|
)
|
|
)
|
|
|
|
|
|
@@ -766,10 +764,6 @@ func parsePath(ctx context.Context, r *http.Request) (context.Context, error) {
|
|
return ctx, err
|
|
return ctx, err
|
|
}
|
|
}
|
|
|
|
|
|
- if _, err = url.ParseRequestURI(imageURL); err != nil {
|
|
|
|
- return ctx, errInvalidImageURL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
ctx = context.WithValue(ctx, imageURLCtxKey, imageURL)
|
|
ctx = context.WithValue(ctx, imageURLCtxKey, imageURL)
|
|
ctx = context.WithValue(ctx, processingOptionsCtxKey, po)
|
|
ctx = context.WithValue(ctx, processingOptionsCtxKey, po)
|
|
|
|
|