Skip to content

Commit

Permalink
v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cshum committed Jun 17, 2022
1 parent f83806b commit d5ae59d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imagor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"time"
)

const Version = "0.8.29"
const Version = "0.9.0"

// Loader load image from source
type Loader interface {
Expand Down Expand Up @@ -157,15 +157,15 @@ func (app *Imagor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
blob, err := app.Do(r, p)
if err == nil && blob != nil {
err = blob.Err()
}
if err == nil && p.Meta && blob != nil && blob.Meta != nil {
resJSON(w, blob.Meta)
return
}
if !isEmpty(blob) {
w.Header().Set("Content-Type", blob.ContentType())
if err == nil {
err = blob.Err()
}
}
if err != nil {
if errors.Is(err, context.Canceled) {
Expand Down

0 comments on commit d5ae59d

Please sign in to comment.