mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 20:52:14 +01:00
moving withConverter call up
This commit is contained in:
@@ -62,10 +62,11 @@ func convertHandler(next http.Handler) http.Handler {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
logger.Error(err)
|
logger.Error(err)
|
||||||
cleanup(r)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r = context.WithConverter(r, c)
|
||||||
|
|
||||||
path, err := c.Convert()
|
path, err := c.Convert()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
@@ -74,7 +75,6 @@ func convertHandler(next http.Handler) http.Handler {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
r = context.WithConverter(r, c)
|
|
||||||
r = context.WithResultFilePath(r, path)
|
r = context.WithResultFilePath(r, path)
|
||||||
|
|
||||||
next.ServeHTTP(w, r)
|
next.ServeHTTP(w, r)
|
||||||
|
|||||||
Reference in New Issue
Block a user